admin/api: new route to list remote files and their properties

This commit is contained in:
nemunaire 2020-01-19 00:54:00 +01:00
commit 2bae30a841
3 changed files with 39 additions and 2 deletions

View file

@ -29,13 +29,13 @@ var PlainDigest bool = false
// EFile represents a challenge file.
type EFile struct {
Id int64 `json:"id"`
Id int64 `json:"id,omitempty"`
// origin holds the import relative path of the file
origin string
// Path is the location where the file is stored, relatively to FilesDir
Path string `json:"path"`
// IdExercice is the identifier of the underlying challenge
IdExercice int64 `json:"idExercice"`
IdExercice int64 `json:"idExercice,omitempty"`
// Name is the title displayed to players
Name string `json:"name"`
// Checksum stores the cached hash of the file