sync: return binding between challenge.txt IDs and DB item
This commit is contained in:
parent
4a490b1a33
commit
d97ecde3fb
5 changed files with 20 additions and 10 deletions
|
@ -65,11 +65,13 @@ func init() {
|
|||
})))
|
||||
router.POST("/api/sync/exercices/:eid/hints", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) {
|
||||
return sync.SyncExerciceHints(sync.GlobalImporter, exercice), nil
|
||||
_, errs := sync.SyncExerciceHints(sync.GlobalImporter, exercice)
|
||||
return errs, nil
|
||||
})))
|
||||
router.POST("/api/sync/exercices/:eid/flags", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) {
|
||||
return sync.SyncExerciceFlags(sync.GlobalImporter, exercice), nil
|
||||
_, errs := sync.SyncExerciceFlags(sync.GlobalImporter, exercice)
|
||||
return errs, nil
|
||||
})))
|
||||
|
||||
router.POST("/api/sync/exercices/:eid/fixurlid", apiHandler(exerciceHandler(
|
||||
|
|
|
@ -70,11 +70,13 @@ func init() {
|
|||
})))
|
||||
router.POST("/api/sync/themes/:thid/exercices/:eid/hints", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) {
|
||||
return sync.SyncExerciceHints(sync.GlobalImporter, exercice), nil
|
||||
_, errs := sync.SyncExerciceHints(sync.GlobalImporter, exercice)
|
||||
return errs, nil
|
||||
})))
|
||||
router.POST("/api/sync/themes/:thid/exercices/:eid/keys", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) {
|
||||
return sync.SyncExerciceFlags(sync.GlobalImporter, exercice), nil
|
||||
_, errs := sync.SyncExerciceFlags(sync.GlobalImporter, exercice)
|
||||
return errs, nil
|
||||
})))
|
||||
|
||||
router.POST("/api/sync/themes/:thid/fixurlid", apiHandler(themeHandler(
|
||||
|
|
Reference in a new issue