New route to export raw key
This commit is contained in:
parent
a3e001db09
commit
8b4c32268d
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