add search by username
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-22 16:13:35 +11:00
parent de1a076d64
commit abaa291a14
3 changed files with 31 additions and 2 deletions

View File

@@ -270,6 +270,9 @@ func main() {
// Other functions for admin
adminOnly.POST("/unlock", controllers.Unlock)
adminOnly.GET("/logs", controllers.GetAuditLogsHandler)
// TODO
//adminOnly.GET("/logs/secret/:id", controllers.GetAuditLogsBySecretHandler)
//adminOnly.GET("/logs/user/:id", controllers.GetAuditLogsByUserHandler)
// Get secrets
secretRoutes := router.Group("/api/secret")
@@ -293,6 +296,7 @@ func main() {
// See https://gin-gonic.com/docs/examples/param-in-path/
secretRoutes.GET("/retrieve/name/:devicename", controllers.RetrieveSecretByDevicename)
secretRoutes.GET("/retrieve/category/:devicecategory", controllers.RetrieveSecretByDevicecategory)
secretRoutes.GET("/retrieve/user/:username", controllers.RetrieveSecretByUsername)
// Initializing the server in a goroutine so that
// it won't block the graceful shutdown handling below