New route to export raw key
This commit is contained in:
parent
0afe641a9e
commit
f184c7d8de
3
keys.go
3
keys.go
@ -88,6 +88,9 @@ func declareAPIAuthKeysRoutes(router *gin.RouterGroup) {
|
|||||||
|
|
||||||
c.JSON(http.StatusOK, k)
|
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) {
|
keysRoutes.PUT("", func(c *gin.Context) {
|
||||||
current := c.MustGet("key").(*Key)
|
current := c.MustGet("key").(*Key)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user