fix request type for secret list
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-13 14:11:13 +10:00
parent 969d1ca8d0
commit 95c6bccefb
2 changed files with 3 additions and 3 deletions

View File

@@ -153,4 +153,4 @@ Users with ReadOnly role will receive Forbidden error when calling this API endp
#### List
GET `/api/secret/list`
Not yet implemented. Will generate a list of device names and categories but not username or secret data.
Will generate a list of device names and categories but not secret data.

View File

@@ -148,12 +148,12 @@ func main() {
protected := router.Group("/api/secret")
protected.Use(middlewares.JwtAuthMiddleware())
protected.POST("/retrieve", controllers.RetrieveSecret)
protected.POST("/list", controllers.ListSecrets)
protected.GET("/list", controllers.ListSecrets)
protected.POST("/retrieveMultiple", controllers.RetrieveMultpleSecrets)
protected.POST("/store", controllers.StoreSecret)
protected.POST("/update", controllers.UpdateSecret)
// TODO - support parameters in path
// Support parameters in path
// See https://gin-gonic.com/docs/examples/param-in-path/
protected.GET("/retrieve/name/:devicename", controllers.RetrieveSecretByDevicename)
protected.GET("/retrieve/category/:devicecategory", controllers.RetrieveSecretByDevicecategory)