sync: implement hint dependency on flags
This commit is contained in:
parent
6ad11e49d5
commit
f3a34c00db
5 changed files with 176 additions and 117 deletions
|
@ -65,13 +65,14 @@ func init() {
|
|||
})))
|
||||
router.POST("/api/sync/exercices/:eid/hints", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) {
|
||||
_, errs := sync.SyncExerciceHints(sync.GlobalImporter, exercice)
|
||||
_, errs := sync.SyncExerciceHints(sync.GlobalImporter, exercice, sync.ExerciceFlagsMap(sync.GlobalImporter, exercice))
|
||||
return errs, nil
|
||||
})))
|
||||
router.POST("/api/sync/exercices/:eid/flags", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) {
|
||||
_, errs := sync.SyncExerciceFlags(sync.GlobalImporter, exercice)
|
||||
return errs, nil
|
||||
_, herrs := sync.SyncExerciceHints(sync.GlobalImporter, exercice, sync.ExerciceFlagsMap(sync.GlobalImporter, exercice))
|
||||
return append(errs, herrs...), nil
|
||||
})))
|
||||
|
||||
router.POST("/api/sync/exercices/:eid/fixurlid", apiHandler(exerciceHandler(
|
||||
|
|
Reference in a new issue