aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--backend/controllers/homeController.go1
-rw-r--r--backend/controllers/loginController.go1
-rw-r--r--backend/controllers/mapController.go1
-rw-r--r--backend/controllers/recordController.go2
-rw-r--r--backend/controllers/userController.go4
-rw-r--r--docs/docs.go24
-rw-r--r--docs/swagger.json24
-rw-r--r--docs/swagger.yaml16
8 files changed, 73 insertions, 0 deletions
diff --git a/backend/controllers/homeController.go b/backend/controllers/homeController.go
index b6ab644..539d2c4 100644
--- a/backend/controllers/homeController.go
+++ b/backend/controllers/homeController.go
@@ -22,6 +22,7 @@ func Home(c *gin.Context) {
22// GET Rankings 22// GET Rankings
23// 23//
24// @Summary Get rankings of every player. 24// @Summary Get rankings of every player.
25// @Tags rankings
25// @Accept json 26// @Accept json
26// @Produce json 27// @Produce json
27// @Success 200 {object} models.Response{data=models.RankingsResponse} 28// @Success 200 {object} models.Response{data=models.RankingsResponse}
diff --git a/backend/controllers/loginController.go b/backend/controllers/loginController.go
index 3e59211..6c0453b 100644
--- a/backend/controllers/loginController.go
+++ b/backend/controllers/loginController.go
@@ -18,6 +18,7 @@ import (
18// Login 18// Login
19// 19//
20// @Summary Get (redirect) login page for Steam auth. 20// @Summary Get (redirect) login page for Steam auth.
21// @Tags login
21// @Accept json 22// @Accept json
22// @Produce json 23// @Produce json
23// @Success 200 {object} models.Response{data=models.LoginResponse} 24// @Success 200 {object} models.Response{data=models.LoginResponse}
diff --git a/backend/controllers/mapController.go b/backend/controllers/mapController.go
index 1560441..16dd669 100644
--- a/backend/controllers/mapController.go
+++ b/backend/controllers/mapController.go
@@ -12,6 +12,7 @@ import (
12// GET Map 12// GET Map
13// 13//
14// @Summary Get map page with specified id. 14// @Summary Get map page with specified id.
15// @Tags maps
15// @Accept json 16// @Accept json
16// @Produce json 17// @Produce json
17// @Param id path int true "Map ID" 18// @Param id path int true "Map ID"
diff --git a/backend/controllers/recordController.go b/backend/controllers/recordController.go
index 3e64e14..3b4bdc7 100644
--- a/backend/controllers/recordController.go
+++ b/backend/controllers/recordController.go
@@ -21,6 +21,7 @@ import (
21// POST Record 21// POST Record
22// 22//
23// @Summary Post record with demo of a specific map. 23// @Summary Post record with demo of a specific map.
24// @Tags maps
24// @Accept mpfd 25// @Accept mpfd
25// @Produce json 26// @Produce json
26// @Param Authorization header string true "JWT Token" 27// @Param Authorization header string true "JWT Token"
@@ -194,6 +195,7 @@ func CreateRecordWithDemo(c *gin.Context) {
194// GET Demo 195// GET Demo
195// 196//
196// @Summary Get demo with specified demo uuid. 197// @Summary Get demo with specified demo uuid.
198// @Tags demo
197// @Accept json 199// @Accept json
198// @Produce octet-stream 200// @Produce octet-stream
199// @Param uuid path int true "Demo UUID" 201// @Param uuid path int true "Demo UUID"
diff --git a/backend/controllers/userController.go b/backend/controllers/userController.go
index 51c18d5..c86a739 100644
--- a/backend/controllers/userController.go
+++ b/backend/controllers/userController.go
@@ -14,6 +14,7 @@ import (
14// GET Profile 14// GET Profile
15// 15//
16// @Summary Get profile page of session user. 16// @Summary Get profile page of session user.
17// @Tags users
17// @Accept json 18// @Accept json
18// @Produce json 19// @Produce json
19// @Param Authorization header string true "JWT Token" 20// @Param Authorization header string true "JWT Token"
@@ -100,6 +101,7 @@ func Profile(c *gin.Context) {
100// GET User 101// GET User
101// 102//
102// @Summary Get profile page of another user. 103// @Summary Get profile page of another user.
104// @Tags users
103// @Accept json 105// @Accept json
104// @Produce json 106// @Produce json
105// @Param id path int true "User ID" 107// @Param id path int true "User ID"
@@ -201,6 +203,7 @@ func FetchUser(c *gin.Context) {
201// PUT Profile 203// PUT Profile
202// 204//
203// @Summary Update profile page of session user. 205// @Summary Update profile page of session user.
206// @Tags users
204// @Accept json 207// @Accept json
205// @Produce json 208// @Produce json
206// @Param Authorization header string true "JWT Token" 209// @Param Authorization header string true "JWT Token"
@@ -243,6 +246,7 @@ func UpdateUser(c *gin.Context) {
243// PUT Profile/CountryCode 246// PUT Profile/CountryCode
244// 247//
245// @Summary Update country code of session user. 248// @Summary Update country code of session user.
249// @Tags users
246// @Accept json 250// @Accept json
247// @Produce json 251// @Produce json
248// @Param Authorization header string true "JWT Token" 252// @Param Authorization header string true "JWT Token"
diff --git a/docs/docs.go b/docs/docs.go
index 5cf5e50..f37cda2 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -28,6 +28,9 @@ const docTemplate = `{
28 "produces": [ 28 "produces": [
29 "application/octet-stream" 29 "application/octet-stream"
30 ], 30 ],
31 "tags": [
32 "demo"
33 ],
31 "summary": "Get demo with specified demo uuid.", 34 "summary": "Get demo with specified demo uuid.",
32 "parameters": [ 35 "parameters": [
33 { 36 {
@@ -62,6 +65,9 @@ const docTemplate = `{
62 "produces": [ 65 "produces": [
63 "application/json" 66 "application/json"
64 ], 67 ],
68 "tags": [
69 "login"
70 ],
65 "summary": "Get (redirect) login page for Steam auth.", 71 "summary": "Get (redirect) login page for Steam auth.",
66 "responses": { 72 "responses": {
67 "200": { 73 "200": {
@@ -99,6 +105,9 @@ const docTemplate = `{
99 "produces": [ 105 "produces": [
100 "application/json" 106 "application/json"
101 ], 107 ],
108 "tags": [
109 "maps"
110 ],
102 "summary": "Get map page with specified id.", 111 "summary": "Get map page with specified id.",
103 "parameters": [ 112 "parameters": [
104 { 113 {
@@ -145,6 +154,9 @@ const docTemplate = `{
145 "produces": [ 154 "produces": [
146 "application/json" 155 "application/json"
147 ], 156 ],
157 "tags": [
158 "maps"
159 ],
148 "summary": "Post record with demo of a specific map.", 160 "summary": "Post record with demo of a specific map.",
149 "parameters": [ 161 "parameters": [
150 { 162 {
@@ -235,6 +247,9 @@ const docTemplate = `{
235 "produces": [ 247 "produces": [
236 "application/json" 248 "application/json"
237 ], 249 ],
250 "tags": [
251 "users"
252 ],
238 "summary": "Get profile page of session user.", 253 "summary": "Get profile page of session user.",
239 "parameters": [ 254 "parameters": [
240 { 255 {
@@ -285,6 +300,9 @@ const docTemplate = `{
285 "produces": [ 300 "produces": [
286 "application/json" 301 "application/json"
287 ], 302 ],
303 "tags": [
304 "users"
305 ],
288 "summary": "Update country code of session user.", 306 "summary": "Update country code of session user.",
289 "parameters": [ 307 "parameters": [
290 { 308 {
@@ -342,6 +360,9 @@ const docTemplate = `{
342 "produces": [ 360 "produces": [
343 "application/json" 361 "application/json"
344 ], 362 ],
363 "tags": [
364 "users"
365 ],
345 "summary": "Update profile page of session user.", 366 "summary": "Update profile page of session user.",
346 "parameters": [ 367 "parameters": [
347 { 368 {
@@ -394,6 +415,9 @@ const docTemplate = `{
394 "produces": [ 415 "produces": [
395 "application/json" 416 "application/json"
396 ], 417 ],
418 "tags": [
419 "users"
420 ],
397 "summary": "Get profile page of another user.", 421 "summary": "Get profile page of another user.",
398 "parameters": [ 422 "parameters": [
399 { 423 {
diff --git a/docs/swagger.json b/docs/swagger.json
index 82fb64c..9ed27d5 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -21,6 +21,9 @@
21 "produces": [ 21 "produces": [
22 "application/octet-stream" 22 "application/octet-stream"
23 ], 23 ],
24 "tags": [
25 "demo"
26 ],
24 "summary": "Get demo with specified demo uuid.", 27 "summary": "Get demo with specified demo uuid.",
25 "parameters": [ 28 "parameters": [
26 { 29 {
@@ -55,6 +58,9 @@
55 "produces": [ 58 "produces": [
56 "application/json" 59 "application/json"
57 ], 60 ],
61 "tags": [
62 "login"
63 ],
58 "summary": "Get (redirect) login page for Steam auth.", 64 "summary": "Get (redirect) login page for Steam auth.",
59 "responses": { 65 "responses": {
60 "200": { 66 "200": {
@@ -92,6 +98,9 @@
92 "produces": [ 98 "produces": [
93 "application/json" 99 "application/json"
94 ], 100 ],
101 "tags": [
102 "maps"
103 ],
95 "summary": "Get map page with specified id.", 104 "summary": "Get map page with specified id.",
96 "parameters": [ 105 "parameters": [
97 { 106 {
@@ -138,6 +147,9 @@
138 "produces": [ 147 "produces": [
139 "application/json" 148 "application/json"
140 ], 149 ],
150 "tags": [
151 "maps"
152 ],
141 "summary": "Post record with demo of a specific map.", 153 "summary": "Post record with demo of a specific map.",
142 "parameters": [ 154 "parameters": [
143 { 155 {
@@ -228,6 +240,9 @@
228 "produces": [ 240 "produces": [
229 "application/json" 241 "application/json"
230 ], 242 ],
243 "tags": [
244 "users"
245 ],
231 "summary": "Get profile page of session user.", 246 "summary": "Get profile page of session user.",
232 "parameters": [ 247 "parameters": [
233 { 248 {
@@ -278,6 +293,9 @@
278 "produces": [ 293 "produces": [
279 "application/json" 294 "application/json"
280 ], 295 ],
296 "tags": [
297 "users"
298 ],
281 "summary": "Update country code of session user.", 299 "summary": "Update country code of session user.",
282 "parameters": [ 300 "parameters": [
283 { 301 {
@@ -335,6 +353,9 @@
335 "produces": [ 353 "produces": [
336 "application/json" 354 "application/json"
337 ], 355 ],
356 "tags": [
357 "users"
358 ],
338 "summary": "Update profile page of session user.", 359 "summary": "Update profile page of session user.",
339 "parameters": [ 360 "parameters": [
340 { 361 {
@@ -387,6 +408,9 @@
387 "produces": [ 408 "produces": [
388 "application/json" 409 "application/json"
389 ], 410 ],
411 "tags": [
412 "users"
413 ],
390 "summary": "Get profile page of another user.", 414 "summary": "Get profile page of another user.",
391 "parameters": [ 415 "parameters": [
392 { 416 {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 76b4e7b..c134197 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -122,6 +122,8 @@ paths:
122 schema: 122 schema:
123 $ref: '#/definitions/models.Response' 123 $ref: '#/definitions/models.Response'
124 summary: Get demo with specified demo uuid. 124 summary: Get demo with specified demo uuid.
125 tags:
126 - demo
125 /login: 127 /login:
126 get: 128 get:
127 consumes: 129 consumes:
@@ -143,6 +145,8 @@ paths:
143 schema: 145 schema:
144 $ref: '#/definitions/models.Response' 146 $ref: '#/definitions/models.Response'
145 summary: Get (redirect) login page for Steam auth. 147 summary: Get (redirect) login page for Steam auth.
148 tags:
149 - login
146 /maps/{id}: 150 /maps/{id}:
147 get: 151 get:
148 consumes: 152 consumes:
@@ -170,6 +174,8 @@ paths:
170 schema: 174 schema:
171 $ref: '#/definitions/models.Response' 175 $ref: '#/definitions/models.Response'
172 summary: Get map page with specified id. 176 summary: Get map page with specified id.
177 tags:
178 - maps
173 /maps/{id}/record: 179 /maps/{id}/record:
174 post: 180 post:
175 consumes: 181 consumes:
@@ -228,6 +234,8 @@ paths:
228 schema: 234 schema:
229 $ref: '#/definitions/models.Response' 235 $ref: '#/definitions/models.Response'
230 summary: Post record with demo of a specific map. 236 summary: Post record with demo of a specific map.
237 tags:
238 - maps
231 /profile: 239 /profile:
232 get: 240 get:
233 consumes: 241 consumes:
@@ -259,6 +267,8 @@ paths:
259 schema: 267 schema:
260 $ref: '#/definitions/models.Response' 268 $ref: '#/definitions/models.Response'
261 summary: Get profile page of session user. 269 summary: Get profile page of session user.
270 tags:
271 - users
262 post: 272 post:
263 consumes: 273 consumes:
264 - application/json 274 - application/json
@@ -289,6 +299,8 @@ paths:
289 schema: 299 schema:
290 $ref: '#/definitions/models.Response' 300 $ref: '#/definitions/models.Response'
291 summary: Update profile page of session user. 301 summary: Update profile page of session user.
302 tags:
303 - users
292 put: 304 put:
293 consumes: 305 consumes:
294 - application/json 306 - application/json
@@ -324,6 +336,8 @@ paths:
324 schema: 336 schema:
325 $ref: '#/definitions/models.Response' 337 $ref: '#/definitions/models.Response'
326 summary: Update country code of session user. 338 summary: Update country code of session user.
339 tags:
340 - users
327 /user/{id}: 341 /user/{id}:
328 get: 342 get:
329 consumes: 343 consumes:
@@ -355,4 +369,6 @@ paths:
355 schema: 369 schema:
356 $ref: '#/definitions/models.Response' 370 $ref: '#/definitions/models.Response'
357 summary: Get profile page of another user. 371 summary: Get profile page of another user.
372 tags:
373 - users
358swagger: "2.0" 374swagger: "2.0"