New route to export raw key
This commit is contained in:
parent
0afe641a9e
commit
f184c7d8de
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