mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(api): add admin master key listing/revoke
Add admin endpoints to list and revoke child keys under a master. Standardize OpenAPI responses to use ResponseEnvelope with MapData for error payloads, and regenerate swagger specs accordingly.
This commit is contained in:
@@ -58,8 +58,8 @@ func isAllowedStatus(raw string, allowed ...string) bool {
|
||||
// @Security AdminAuth
|
||||
// @Param request body BatchActionRequest true "Batch payload"
|
||||
// @Success 200 {object} ResponseEnvelope{data=BatchResponse}
|
||||
// @Failure 400 {object} ResponseEnvelope{data=gin.H}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=gin.H}
|
||||
// @Failure 400 {object} ResponseEnvelope{data=MapData}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=MapData}
|
||||
// @Router /admin/masters/batch [post]
|
||||
func (h *AdminHandler) BatchMasters(c *gin.Context) {
|
||||
var req BatchActionRequest
|
||||
@@ -113,8 +113,8 @@ func (h *AdminHandler) BatchMasters(c *gin.Context) {
|
||||
// @Security AdminAuth
|
||||
// @Param request body BatchActionRequest true "Batch payload"
|
||||
// @Success 200 {object} ResponseEnvelope{data=BatchResponse}
|
||||
// @Failure 400 {object} ResponseEnvelope{data=gin.H}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=gin.H}
|
||||
// @Failure 400 {object} ResponseEnvelope{data=MapData}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=MapData}
|
||||
// @Router /admin/api-keys/batch [post]
|
||||
func (h *Handler) BatchAPIKeys(c *gin.Context) {
|
||||
var req BatchActionRequest
|
||||
@@ -197,8 +197,8 @@ func (h *Handler) BatchAPIKeys(c *gin.Context) {
|
||||
// @Security AdminAuth
|
||||
// @Param request body BatchActionRequest true "Batch payload"
|
||||
// @Success 200 {object} ResponseEnvelope{data=BatchResponse}
|
||||
// @Failure 400 {object} ResponseEnvelope{data=gin.H}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=gin.H}
|
||||
// @Failure 400 {object} ResponseEnvelope{data=MapData}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=MapData}
|
||||
// @Router /admin/models/batch [post]
|
||||
func (h *Handler) BatchModels(c *gin.Context) {
|
||||
var req BatchActionRequest
|
||||
@@ -249,8 +249,8 @@ func (h *Handler) BatchModels(c *gin.Context) {
|
||||
// @Security AdminAuth
|
||||
// @Param request body BatchActionRequest true "Batch payload"
|
||||
// @Success 200 {object} ResponseEnvelope{data=BatchResponse}
|
||||
// @Failure 400 {object} ResponseEnvelope{data=gin.H}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=gin.H}
|
||||
// @Failure 400 {object} ResponseEnvelope{data=MapData}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=MapData}
|
||||
// @Router /admin/bindings/batch [post]
|
||||
func (h *Handler) BatchBindings(c *gin.Context) {
|
||||
var req BatchActionRequest
|
||||
|
||||
Reference in New Issue
Block a user