admin: can sync exercices
This commit is contained in:
parent
762d3a5222
commit
993b83f8e7
@ -35,6 +35,15 @@ func init() {
|
||||
router.GET("/api/exercices/:eid/keys/:kid", apiHandler(keyHandler(showExerciceKey)))
|
||||
router.PUT("/api/exercices/:eid/keys/:kid", apiHandler(keyHandler(updateExerciceKey)))
|
||||
router.DELETE("/api/exercices/:eid/keys/:kid", apiHandler(keyHandler(deleteExerciceKey)))
|
||||
|
||||
|
||||
// Synchronize
|
||||
router.GET("/api/sync/exercices/:eid/files", apiHandler(exerciceHandler(
|
||||
func(exercice fic.Exercice, _ []byte) (interface{}, error) { return sync.SyncExerciceFiles(sync.GlobalImporter, exercice), nil })))
|
||||
router.GET("/api/sync/exercices/:eid/hints", apiHandler(exerciceHandler(
|
||||
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 })))
|
||||
}
|
||||
|
||||
func listExercices(_ httprouter.Params, body []byte) (interface{}, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user