From 4b44c9369341299c94fc04428591f5d193201d43 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Wed, 10 Jan 2024 11:33:07 +1100 Subject: [PATCH] update safe handler --- main.go | 2 +- models/safe.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index a0b6f5d..0b63e42 100644 --- a/main.go +++ b/main.go @@ -259,7 +259,7 @@ func main() { // Other functions for admin adminOnly.POST("/unlock", controllers.Unlock) - adminOnly.POST("/safes/listall", controllers.GetAllSafesHandler) + adminOnly.POST("/safe/listall", controllers.GetAllSafesHandler) // Deprecated //adminOnly.GET("/roles", controllers.GetRoles) diff --git a/models/safe.go b/models/safe.go index 772d93a..0fd4f44 100644 --- a/models/safe.go +++ b/models/safe.go @@ -6,8 +6,8 @@ import ( ) type Safe struct { - SafeId int `db:"SafeId"` - SafeName string `db:"SafeName"` + SafeId int `db:"SafeId" json:"safeId"` + SafeName string `db:"SafeName" json:"safeName"` } // SafeGetByName queries the database for the specified safe name