New route to export raw key

This commit is contained in:
nemunaire 2022-09-10 00:37:48 +02:00
parent 0afe641a9e
commit f184c7d8de

View File

@ -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)