chore: added way to add new images

This commit is contained in:
2024-03-09 09:41:16 +00:00
parent 4a95f0211d
commit 0d37ba8d59
12 changed files with 510 additions and 176 deletions

View File

@@ -75,7 +75,7 @@ func handleEdit(handle *Handle) {
return c.Error500(err)
}
cls, err := model_classes.ListClasses(handle.Db, id)
cls, err := model_classes.ListClasses(c, id)
if err != nil {
return c.Error500(err)
}
@@ -86,9 +86,9 @@ func handleEdit(handle *Handle) {
}
type ReturnType struct {
Classes []model_classes.ModelClass `json:"classes"`
HasData bool `json:"has_data"`
NumberOfInvalidImages int `json:"number_of_invalid_images"`
Classes []*model_classes.ModelClass `json:"classes"`
HasData bool `json:"has_data"`
NumberOfInvalidImages int `json:"number_of_invalid_images"`
}
return c.SendJSON(ReturnType{
@@ -314,7 +314,7 @@ func handleEdit(handle *Handle) {
return c.Error500(err)
}
cls, err := model_classes.ListClasses(handle.Db, id)
cls, err := model_classes.ListClasses(c, id)
if err != nil {
return c.Error500(err)
}