This commit is contained in:
2023-10-20 12:37:56 +01:00
parent b5ba0d295a
commit bc801648a3
6 changed files with 182 additions and 131 deletions

View File

@@ -6,6 +6,7 @@ import (
"strconv"
. "git.andr3h3nriqu3s.com/andr3/fyp/logic/utils"
. "git.andr3h3nriqu3s.com/andr3/fyp/logic/models/utils"
)
func HandleList(handle *Handle) {
@@ -48,6 +49,11 @@ func HandleList(handle *Handle) {
return Error500(nil)
}
model, err := GetBaseModel(c.Db, model_id)
if err != nil {
return Error500(err)
}
rows, err := handle.Db.Query("select id, file_path, model_mode, status from model_data_point where class_id=$1 limit 10 offset $2;", id, page * 10)
if err != nil {
return Error500(err)
@@ -95,7 +101,7 @@ func HandleList(handle *Handle) {
"Page": page,
"Id": id,
"Name": name,
"ModelId": model_id,
"Model": model,
}))
return nil
})