feat(token): add batch API for fetching token keys
Add new endpoint POST /api/token/batch/keys to fetch multiple token keys in a single request, improving performance when exporting or copying multiple tokens. - Backend: Add GetTokenKeysBatch controller and GetTokenKeysByIds model - Backend: Add route with CriticalRateLimit and DisableCache middleware - Frontend: Add fetchTokenKeysBatch helper function - Frontend: Update useTokensData to use batch API for token export
This commit is contained in:
@@ -257,6 +257,7 @@ func SetApiRouter(router *gin.Engine) {
|
||||
tokenRoute.PUT("/", controller.UpdateToken)
|
||||
tokenRoute.DELETE("/:id", controller.DeleteToken)
|
||||
tokenRoute.POST("/batch", controller.DeleteTokenBatch)
|
||||
tokenRoute.POST("/batch/keys", middleware.CriticalRateLimit(), middleware.DisableCache(), controller.GetTokenKeysBatch)
|
||||
}
|
||||
|
||||
usageRoute := apiRouter.Group("/usage")
|
||||
|
||||
Reference in New Issue
Block a user