update: new logging functions
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"git.matterlinux.xyz/matter/security/lib"
|
||||
"git.matterlinux.xyz/matter/security/log"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
func POSTStatus(c *fiber.Ctx) error {
|
||||
func POST_Status(c *fiber.Ctx) error {
|
||||
body := struct {
|
||||
ID string `form:"id"`
|
||||
Status string `form:"status"`
|
||||
@ -23,7 +23,7 @@ func POSTStatus(c *fiber.Ctx) error {
|
||||
|
||||
user, err := lib.GetUser(c)
|
||||
if err != nil {
|
||||
log.Printf("Failed to get the user: %s", err.Error())
|
||||
log.Error("Failed to get the user: %s", err.Error())
|
||||
return lib.RenderError(c, 500)
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ func POSTStatus(c *fiber.Ctx) error {
|
||||
|
||||
err = lib.UpdateVuln(vuln)
|
||||
if err != nil {
|
||||
log.Printf("Failed to update the vuln: %s", err.Error())
|
||||
log.Error("Failed to update the vuln: %s", err.Error())
|
||||
return lib.RenderError(c, 500)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user