add last updated tracking for secrets
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-16 16:21:41 +11:00
parent 498dd9a8c3
commit b278a3c7d8
3 changed files with 48 additions and 23 deletions

View File

@@ -5,6 +5,7 @@ import (
"log"
"net/http"
"smt/models"
"time"
"github.com/gin-gonic/gin"
)
@@ -19,12 +20,13 @@ type RetrieveInput struct {
}
type ListSecret struct {
SecretId int `db:"SecretId" json:"secretId"`
SafeId int `db:"SafeId" json:"safeId"`
DeviceName string `db:"DeviceName" json:"deviceName"`
DeviceCategory string `db:"DeviceCategory" json:"deviceCategory"`
UserName string `db:"UserName" json:"userName"`
Secret string `db:"Secret" json:"-"`
SecretId int `db:"SecretId" json:"secretId"`
SafeId int `db:"SafeId" json:"safeId"`
DeviceName string `db:"DeviceName" json:"deviceName"`
DeviceCategory string `db:"DeviceCategory" json:"deviceCategory"`
UserName string `db:"UserName" json:"userName"`
Secret string `db:"Secret" json:"-"`
LastUpdated time.Time `db:"LastUpdated" json:"lastUpdated"`
}
func RetrieveSecret(c *gin.Context) {