admin: sync mcq/ucq
This commit is contained in:
parent
d6012dfffb
commit
b079f7891c
5 changed files with 100 additions and 2 deletions
|
@ -44,6 +44,8 @@ func init() {
|
|||
func(exercice fic.Exercice, _ []byte) (interface{}, error) { return sync.SyncExerciceHints(sync.GlobalImporter, exercice), nil })))
|
||||
router.GET("/api/sync/exercices/:eid/keys", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) { return sync.SyncExerciceKeys(sync.GlobalImporter, exercice), nil })))
|
||||
router.GET("/api/sync/exercices/:eid/quiz", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) { return sync.SyncExerciceMCQ(sync.GlobalImporter, exercice), nil })))
|
||||
}
|
||||
|
||||
func listExercices(_ httprouter.Params, body []byte) (interface{}, error) {
|
||||
|
|
|
@ -57,6 +57,8 @@ func init() {
|
|||
func(exercice fic.Exercice, _ []byte) (interface{}, error) { return sync.SyncExerciceHints(sync.GlobalImporter, exercice), nil })))
|
||||
router.GET("/api/sync/themes/:thid/exercices/:eid/keys", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) { return sync.SyncExerciceKeys(sync.GlobalImporter, exercice), nil })))
|
||||
router.GET("/api/sync/themes/:thid/exercices/:eid/quiz", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) { return sync.SyncExerciceMCQ(sync.GlobalImporter, exercice), nil })))
|
||||
}
|
||||
|
||||
func bindingFiles(_ httprouter.Params, body []byte) (interface{}, error) {
|
||||
|
|
|
@ -9,5 +9,5 @@ func init() {
|
|||
}
|
||||
|
||||
func showVersion(_ httprouter.Params, body []byte) (interface{}, error) {
|
||||
return map[string]interface{}{"version": 0.3}, nil
|
||||
return map[string]interface{}{"version": 0.4}, nil
|
||||
}
|
||||
|
|
Reference in a new issue