From b2f216f1bd339e5a869ec9fb512d0317bda787f7 Mon Sep 17 00:00:00 2001 From: Asai Neko Date: Fri, 6 Feb 2026 10:52:58 +0800 Subject: [PATCH] Add lock for attendance swagger doc Signed-off-by: Asai Neko --- api/event/attendance.go | 1 + docs/docs.go | 7 ++++++- docs/swagger.json | 7 ++++++- docs/swagger.yaml | 4 +++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/api/event/attendance.go b/api/event/attendance.go index 7a477f2..1a92bc9 100644 --- a/api/event/attendance.go +++ b/api/event/attendance.go @@ -21,6 +21,7 @@ import ( // @Failure 400 {object} utils.RespStatus{data=nil} "Invalid Input" // @Failure 401 {object} utils.RespStatus{data=nil} "Unauthorized" // @Failure 500 {object} utils.RespStatus{data=nil} "Internal Server Error" +// @Security ApiKeyAuth // @Router /event/attendance [get] func (self *EventHandler) AttendanceList(c *gin.Context) { eventIdStr := c.Query("event_id") diff --git a/docs/docs.go b/docs/docs.go index a647eb3..f88dee2 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -561,6 +561,11 @@ const docTemplate = `{ }, "/event/attendance": { "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], "description": "Retrieves the list of attendees, including user info and decrypted KYC data for a specified event.", "produces": [ "application/json" @@ -2293,7 +2298,7 @@ const docTemplate = `{ var SwaggerInfo = &swag.Spec{ Version: "1.0", Host: "localhost:8000", - BasePath: "/api/v1", + BasePath: "/app/api/v1", Schemes: []string{"http", "https"}, Title: "NixCN CMS API", Description: "API Docs based on Gin framework", diff --git a/docs/swagger.json b/docs/swagger.json index 7c2f80c..ef94eb7 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -20,7 +20,7 @@ "version": "1.0" }, "host": "localhost:8000", - "basePath": "/api/v1", + "basePath": "/app/api/v1", "paths": { "/auth/exchange": { "post": { @@ -559,6 +559,11 @@ }, "/event/attendance": { "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], "description": "Retrieves the list of attendees, including user info and decrypted KYC data for a specified event.", "produces": [ "application/json" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 3636865..c6695e8 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,4 +1,4 @@ -basePath: /api/v1 +basePath: /app/api/v1 definitions: data.EventIndexDoc: properties: @@ -566,6 +566,8 @@ paths: data: type: object type: object + security: + - ApiKeyAuth: [] summary: Get Attendance List tags: - Event