Explorar o código

add test other

sunsheng hai 1 ano
pai
achega
666edd0d1f
Modificáronse 3 ficheiros con 18 adicións e 0 borrados
  1. 0 0
      aa
  2. 3 0
      src/api/router.go
  3. 15 0
      src/api/test.go

+ 0 - 0
aa


+ 3 - 0
src/api/router.go

@@ -40,6 +40,9 @@ func RegRouters(svc *Service) {
 	root.GETJWT("/admin/test/list/:scope", TestList)
 	root.GETJWT("/admin/test/detail/:id/:scope", TestDetail)
 	root.POSTJWT("/admin/test/update/:scope", UpdateTest)
+	root.POSTJWT("/admin/test/import/:scope", ImportTest)
+	root.POSTJWT("/admin/test/export/:scope", ExportTest)
+	root.POSTJWT("/admin/test/tmplate/:scope", TestTmplate)
 
 	// 生成考核试题
 	root.POSTJWT("/exeam/generate/:scope", GenerateExeam)

+ 15 - 0
src/api/test.go

@@ -138,3 +138,18 @@ func UpdateTest(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 	}
 	return repo.RepoUpdateDbSetDoc(apictx.CreateRepoCtx(), db, repo.CollectionTest, test.Id.Hex(), test)
 }
+
+// 导入试题
+func ImportTest(c *gin.Context, apictx *ApiSession) (interface{}, error) {
+	return nil, nil
+}
+
+// 导出试题
+func ExportTest(c *gin.Context, apictx *ApiSession) (interface{}, error) {
+	return nil, nil
+}
+
+// 下载试题模板
+func TestTmplate(c *gin.Context, apictx *ApiSession) (interface{}, error) {
+	return nil, nil
+}