New route to export raw key
This commit is contained in:
parent
a3e001db09
commit
8b4c32268d
1 changed files with 3 additions and 0 deletions
3
keys.go
3
keys.go
|
@ -88,6 +88,9 @@ func declareAPIAuthKeysRoutes(router *gin.RouterGroup) {
|
|||
|
||||
c.JSON(http.StatusOK, k)
|
||||
})
|
||||
keysRoutes.GET("export", func(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, c.MustGet("key").(*Key))
|
||||
})
|
||||
keysRoutes.PUT("", func(c *gin.Context) {
|
||||
current := c.MustGet("key").(*Key)
|
||||
|
||||
|
|
Reference in a new issue