feat: closes #38

This commit is contained in:
2023-10-10 14:58:18 +01:00
parent b6afecc682
commit ef1348fe93
5 changed files with 20 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ func HandleList(handle *Handle) {
return Error500(nil)
}
rows, err := handle.Db.Query("select id, file_path, model_mode from model_data_point where class_id=$1 limit 10 offset $2;", id, page * 10)
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)
}
@@ -58,13 +58,14 @@ func HandleList(handle *Handle) {
Id string
FilePath string
Mode int
Status int
}
got := []baserow{}
for rows.Next() {
nrow := baserow{}
err = rows.Scan(&nrow.Id, &nrow.FilePath, &nrow.Mode)
err = rows.Scan(&nrow.Id, &nrow.FilePath, &nrow.Mode, &nrow.Status)
if err != nil {
return Error500(err)
}