admin: Can extract exercices as ZQDS session.yml
This commit is contained in:
parent
15afbb8b87
commit
457cd307dd
2 changed files with 78 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
|
|
@ -18,6 +19,13 @@ func init() {
|
|||
router.GET("/api/themes", apiHandler(listThemes))
|
||||
router.POST("/api/themes", apiHandler(createTheme))
|
||||
router.GET("/api/themes.json", apiHandler(exportThemes))
|
||||
router.GET("/api/session-forensic.yaml", apiHandler(func(_ httprouter.Params, _ []byte) (interface{}, error) {
|
||||
if s, err := settings.ReadSettings(path.Join(settings.SettingsDir, settings.SettingsFile)); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return fic.GenZQDSSessionFile(s)
|
||||
}
|
||||
}))
|
||||
router.GET("/api/files-bindings", apiHandler(bindingFiles))
|
||||
|
||||
router.GET("/api/themes/:thid", apiHandler(themeHandler(showTheme)))
|
||||
|
|
|
|||
Reference in a new issue