fyp/logic/models/utils/utils.go

15 lines
410 B
Go
Raw Normal View History

package models_utils
import (
. "git.andr3h3nriqu3s.com/andr3/fyp/logic/utils"
)
// TODO make this return and caller handle error
func ModelUpdateStatus(c *Context, id string, status int) {
2024-03-09 09:41:16 +00:00
_, err := c.Db.Exec("update models set status=$1 where id=$2;", status, id)
if err != nil {
2024-03-09 09:41:16 +00:00
c.Logger.Error("Failed to update model status", "err", err)
c.Logger.Warn("TODO Maybe handle better")
}
}