aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/docs.go641
-rw-r--r--docs/swagger.json641
-rw-r--r--docs/swagger.yaml422
3 files changed, 1252 insertions, 452 deletions
diff --git a/docs/docs.go b/docs/docs.go
index d39fd1c..423afad 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -22,13 +22,13 @@ const docTemplate = `{
22 "paths": { 22 "paths": {
23 "/chapters/{id}": { 23 "/chapters/{id}": {
24 "get": { 24 "get": {
25 "description": "Get maps from the specified chapter id.",
25 "produces": [ 26 "produces": [
26 "application/json" 27 "application/json"
27 ], 28 ],
28 "tags": [ 29 "tags": [
29 "games \u0026 chapters" 30 "games \u0026 chapters"
30 ], 31 ],
31 "summary": "Get maps from the specified chapter id.",
32 "parameters": [ 32 "parameters": [
33 { 33 {
34 "type": "integer", 34 "type": "integer",
@@ -66,45 +66,9 @@ const docTemplate = `{
66 } 66 }
67 } 67 }
68 }, 68 },
69 "/demo": {
70 "get": {
71 "produces": [
72 "application/json"
73 ],
74 "tags": [
75 "rankings"
76 ],
77 "summary": "Get rankings of every player.",
78 "responses": {
79 "200": {
80 "description": "OK",
81 "schema": {
82 "allOf": [
83 {
84 "$ref": "#/definitions/models.Response"
85 },
86 {
87 "type": "object",
88 "properties": {
89 "data": {
90 "$ref": "#/definitions/models.RankingsResponse"
91 }
92 }
93 }
94 ]
95 }
96 },
97 "400": {
98 "description": "Bad Request",
99 "schema": {
100 "$ref": "#/definitions/models.Response"
101 }
102 }
103 }
104 }
105 },
106 "/demos": { 69 "/demos": {
107 "get": { 70 "get": {
71 "description": "Get demo with specified demo uuid.",
108 "consumes": [ 72 "consumes": [
109 "application/json" 73 "application/json"
110 ], 74 ],
@@ -114,10 +78,9 @@ const docTemplate = `{
114 "tags": [ 78 "tags": [
115 "demo" 79 "demo"
116 ], 80 ],
117 "summary": "Get demo with specified demo uuid.",
118 "parameters": [ 81 "parameters": [
119 { 82 {
120 "type": "integer", 83 "type": "string",
121 "description": "Demo UUID", 84 "description": "Demo UUID",
122 "name": "uuid", 85 "name": "uuid",
123 "in": "query", 86 "in": "query",
@@ -142,13 +105,13 @@ const docTemplate = `{
142 }, 105 },
143 "/games": { 106 "/games": {
144 "get": { 107 "get": {
108 "description": "Get games from the leaderboards.",
145 "produces": [ 109 "produces": [
146 "application/json" 110 "application/json"
147 ], 111 ],
148 "tags": [ 112 "tags": [
149 "games \u0026 chapters" 113 "games \u0026 chapters"
150 ], 114 ],
151 "summary": "Get games from the leaderboards.",
152 "responses": { 115 "responses": {
153 "200": { 116 "200": {
154 "description": "OK", 117 "description": "OK",
@@ -182,13 +145,13 @@ const docTemplate = `{
182 }, 145 },
183 "/games/{id}": { 146 "/games/{id}": {
184 "get": { 147 "get": {
148 "description": "Get chapters from the specified game id.",
185 "produces": [ 149 "produces": [
186 "application/json" 150 "application/json"
187 ], 151 ],
188 "tags": [ 152 "tags": [
189 "games \u0026 chapters" 153 "games \u0026 chapters"
190 ], 154 ],
191 "summary": "Get chapters from the specified game id.",
192 "parameters": [ 155 "parameters": [
193 { 156 {
194 "type": "integer", 157 "type": "integer",
@@ -228,6 +191,7 @@ const docTemplate = `{
228 }, 191 },
229 "/login": { 192 "/login": {
230 "get": { 193 "get": {
194 "description": "Get (redirect) login page for Steam auth.",
231 "consumes": [ 195 "consumes": [
232 "application/json" 196 "application/json"
233 ], 197 ],
@@ -237,7 +201,6 @@ const docTemplate = `{
237 "tags": [ 201 "tags": [
238 "login" 202 "login"
239 ], 203 ],
240 "summary": "Get (redirect) login page for Steam auth.",
241 "responses": { 204 "responses": {
242 "200": { 205 "200": {
243 "description": "OK", 206 "description": "OK",
@@ -266,15 +229,77 @@ const docTemplate = `{
266 } 229 }
267 } 230 }
268 }, 231 },
232 "/maps/{id}/image": {
233 "put": {
234 "description": "Edit map image with specified map id.",
235 "produces": [
236 "application/json"
237 ],
238 "tags": [
239 "maps"
240 ],
241 "parameters": [
242 {
243 "type": "string",
244 "description": "JWT Token",
245 "name": "Authorization",
246 "in": "header",
247 "required": true
248 },
249 {
250 "type": "integer",
251 "description": "Map ID",
252 "name": "id",
253 "in": "path",
254 "required": true
255 },
256 {
257 "description": "Body",
258 "name": "request",
259 "in": "body",
260 "required": true,
261 "schema": {
262 "$ref": "#/definitions/models.EditMapImageRequest"
263 }
264 }
265 ],
266 "responses": {
267 "200": {
268 "description": "OK",
269 "schema": {
270 "allOf": [
271 {
272 "$ref": "#/definitions/models.Response"
273 },
274 {
275 "type": "object",
276 "properties": {
277 "data": {
278 "$ref": "#/definitions/models.EditMapImageRequest"
279 }
280 }
281 }
282 ]
283 }
284 },
285 "400": {
286 "description": "Bad Request",
287 "schema": {
288 "$ref": "#/definitions/models.Response"
289 }
290 }
291 }
292 }
293 },
269 "/maps/{id}/leaderboards": { 294 "/maps/{id}/leaderboards": {
270 "get": { 295 "get": {
296 "description": "Get map leaderboards with specified id.",
271 "produces": [ 297 "produces": [
272 "application/json" 298 "application/json"
273 ], 299 ],
274 "tags": [ 300 "tags": [
275 "maps" 301 "maps"
276 ], 302 ],
277 "summary": "Get map leaderboards with specified id.",
278 "parameters": [ 303 "parameters": [
279 { 304 {
280 "type": "integer", 305 "type": "integer",
@@ -326,6 +351,7 @@ const docTemplate = `{
326 }, 351 },
327 "/maps/{id}/record": { 352 "/maps/{id}/record": {
328 "post": { 353 "post": {
354 "description": "Post record with demo of a specific map.",
329 "consumes": [ 355 "consumes": [
330 "multipart/form-data" 356 "multipart/form-data"
331 ], 357 ],
@@ -335,9 +361,15 @@ const docTemplate = `{
335 "tags": [ 361 "tags": [
336 "maps" 362 "maps"
337 ], 363 ],
338 "summary": "Post record with demo of a specific map.",
339 "parameters": [ 364 "parameters": [
340 { 365 {
366 "type": "integer",
367 "description": "Map ID",
368 "name": "id",
369 "in": "path",
370 "required": true
371 },
372 {
341 "type": "string", 373 "type": "string",
342 "description": "JWT Token", 374 "description": "JWT Token",
343 "name": "Authorization", 375 "name": "Authorization",
@@ -345,42 +377,29 @@ const docTemplate = `{
345 "required": true 377 "required": true
346 }, 378 },
347 { 379 {
348 "type": "array", 380 "type": "file",
349 "items": { 381 "description": "Host Demo",
350 "type": "file" 382 "name": "host_demo",
351 },
352 "description": "Demos",
353 "name": "demos",
354 "in": "formData", 383 "in": "formData",
355 "required": true 384 "required": true
356 }, 385 },
357 { 386 {
358 "type": "integer", 387 "type": "file",
359 "description": "Score Count", 388 "description": "Partner Demo",
360 "name": "score_count", 389 "name": "partner_demo",
361 "in": "formData", 390 "in": "formData"
362 "required": true
363 },
364 {
365 "type": "integer",
366 "description": "Score Time",
367 "name": "score_time",
368 "in": "formData",
369 "required": true
370 }, 391 },
371 { 392 {
372 "type": "boolean", 393 "type": "boolean",
373 "description": "Is Partner Orange", 394 "description": "Is Partner Orange",
374 "name": "is_partner_orange", 395 "name": "is_partner_orange",
375 "in": "formData", 396 "in": "formData"
376 "required": true
377 }, 397 },
378 { 398 {
379 "type": "string", 399 "type": "string",
380 "description": "Partner ID", 400 "description": "Partner ID",
381 "name": "partner_id", 401 "name": "partner_id",
382 "in": "formData", 402 "in": "formData"
383 "required": true
384 } 403 }
385 ], 404 ],
386 "responses": { 405 "responses": {
@@ -395,7 +414,7 @@ const docTemplate = `{
395 "type": "object", 414 "type": "object",
396 "properties": { 415 "properties": {
397 "data": { 416 "data": {
398 "$ref": "#/definitions/models.RecordRequest" 417 "$ref": "#/definitions/models.RecordResponse"
399 } 418 }
400 } 419 }
401 } 420 }
@@ -419,13 +438,13 @@ const docTemplate = `{
419 }, 438 },
420 "/maps/{id}/summary": { 439 "/maps/{id}/summary": {
421 "get": { 440 "get": {
441 "description": "Get map summary with specified id.",
422 "produces": [ 442 "produces": [
423 "application/json" 443 "application/json"
424 ], 444 ],
425 "tags": [ 445 "tags": [
426 "maps" 446 "maps"
427 ], 447 ],
428 "summary": "Get map summary with specified id.",
429 "parameters": [ 448 "parameters": [
430 { 449 {
431 "type": "integer", 450 "type": "integer",
@@ -447,19 +466,187 @@ const docTemplate = `{
447 "type": "object", 466 "type": "object",
448 "properties": { 467 "properties": {
449 "data": { 468 "data": {
450 "allOf": [ 469 "$ref": "#/definitions/models.MapSummaryResponse"
451 { 470 }
452 "$ref": "#/definitions/models.Map" 471 }
453 }, 472 }
454 { 473 ]
455 "type": "object", 474 }
456 "properties": { 475 },
457 "data": { 476 "400": {
458 "$ref": "#/definitions/models.MapSummary" 477 "description": "Bad Request",
459 } 478 "schema": {
460 } 479 "$ref": "#/definitions/models.Response"
461 } 480 }
462 ] 481 }
482 }
483 },
484 "put": {
485 "description": "Edit map summary with specified map id.",
486 "produces": [
487 "application/json"
488 ],
489 "tags": [
490 "maps"
491 ],
492 "parameters": [
493 {
494 "type": "string",
495 "description": "JWT Token",
496 "name": "Authorization",
497 "in": "header",
498 "required": true
499 },
500 {
501 "type": "integer",
502 "description": "Map ID",
503 "name": "id",
504 "in": "path",
505 "required": true
506 },
507 {
508 "description": "Body",
509 "name": "request",
510 "in": "body",
511 "required": true,
512 "schema": {
513 "$ref": "#/definitions/models.EditMapSummaryRequest"
514 }
515 }
516 ],
517 "responses": {
518 "200": {
519 "description": "OK",
520 "schema": {
521 "allOf": [
522 {
523 "$ref": "#/definitions/models.Response"
524 },
525 {
526 "type": "object",
527 "properties": {
528 "data": {
529 "$ref": "#/definitions/models.EditMapSummaryRequest"
530 }
531 }
532 }
533 ]
534 }
535 },
536 "400": {
537 "description": "Bad Request",
538 "schema": {
539 "$ref": "#/definitions/models.Response"
540 }
541 }
542 }
543 },
544 "post": {
545 "description": "Create map summary with specified map id.",
546 "produces": [
547 "application/json"
548 ],
549 "tags": [
550 "maps"
551 ],
552 "parameters": [
553 {
554 "type": "string",
555 "description": "JWT Token",
556 "name": "Authorization",
557 "in": "header",
558 "required": true
559 },
560 {
561 "type": "integer",
562 "description": "Map ID",
563 "name": "id",
564 "in": "path",
565 "required": true
566 },
567 {
568 "description": "Body",
569 "name": "request",
570 "in": "body",
571 "required": true,
572 "schema": {
573 "$ref": "#/definitions/models.CreateMapSummaryRequest"
574 }
575 }
576 ],
577 "responses": {
578 "200": {
579 "description": "OK",
580 "schema": {
581 "allOf": [
582 {
583 "$ref": "#/definitions/models.Response"
584 },
585 {
586 "type": "object",
587 "properties": {
588 "data": {
589 "$ref": "#/definitions/models.CreateMapSummaryRequest"
590 }
591 }
592 }
593 ]
594 }
595 },
596 "400": {
597 "description": "Bad Request",
598 "schema": {
599 "$ref": "#/definitions/models.Response"
600 }
601 }
602 }
603 },
604 "delete": {
605 "description": "Delete map summary with specified map id.",
606 "produces": [
607 "application/json"
608 ],
609 "tags": [
610 "maps"
611 ],
612 "parameters": [
613 {
614 "type": "string",
615 "description": "JWT Token",
616 "name": "Authorization",
617 "in": "header",
618 "required": true
619 },
620 {
621 "type": "integer",
622 "description": "Map ID",
623 "name": "id",
624 "in": "path",
625 "required": true
626 },
627 {
628 "description": "Body",
629 "name": "request",
630 "in": "body",
631 "required": true,
632 "schema": {
633 "$ref": "#/definitions/models.DeleteMapSummaryRequest"
634 }
635 }
636 ],
637 "responses": {
638 "200": {
639 "description": "OK",
640 "schema": {
641 "allOf": [
642 {
643 "$ref": "#/definitions/models.Response"
644 },
645 {
646 "type": "object",
647 "properties": {
648 "data": {
649 "$ref": "#/definitions/models.DeleteMapSummaryRequest"
463 } 650 }
464 } 651 }
465 } 652 }
@@ -477,6 +664,7 @@ const docTemplate = `{
477 }, 664 },
478 "/profile": { 665 "/profile": {
479 "get": { 666 "get": {
667 "description": "Get profile page of session user.",
480 "consumes": [ 668 "consumes": [
481 "application/json" 669 "application/json"
482 ], 670 ],
@@ -486,7 +674,6 @@ const docTemplate = `{
486 "tags": [ 674 "tags": [
487 "users" 675 "users"
488 ], 676 ],
489 "summary": "Get profile page of session user.",
490 "parameters": [ 677 "parameters": [
491 { 678 {
492 "type": "string", 679 "type": "string",
@@ -530,6 +717,7 @@ const docTemplate = `{
530 } 717 }
531 }, 718 },
532 "put": { 719 "put": {
720 "description": "Update country code of session user.",
533 "consumes": [ 721 "consumes": [
534 "application/json" 722 "application/json"
535 ], 723 ],
@@ -539,7 +727,6 @@ const docTemplate = `{
539 "tags": [ 727 "tags": [
540 "users" 728 "users"
541 ], 729 ],
542 "summary": "Update country code of session user.",
543 "parameters": [ 730 "parameters": [
544 { 731 {
545 "type": "string", 732 "type": "string",
@@ -560,19 +747,7 @@ const docTemplate = `{
560 "200": { 747 "200": {
561 "description": "OK", 748 "description": "OK",
562 "schema": { 749 "schema": {
563 "allOf": [ 750 "$ref": "#/definitions/models.Response"
564 {
565 "$ref": "#/definitions/models.Response"
566 },
567 {
568 "type": "object",
569 "properties": {
570 "data": {
571 "$ref": "#/definitions/models.ProfileResponse"
572 }
573 }
574 }
575 ]
576 } 751 }
577 }, 752 },
578 "400": { 753 "400": {
@@ -590,6 +765,7 @@ const docTemplate = `{
590 } 765 }
591 }, 766 },
592 "post": { 767 "post": {
768 "description": "Update profile page of session user.",
593 "consumes": [ 769 "consumes": [
594 "application/json" 770 "application/json"
595 ], 771 ],
@@ -599,7 +775,6 @@ const docTemplate = `{
599 "tags": [ 775 "tags": [
600 "users" 776 "users"
601 ], 777 ],
602 "summary": "Update profile page of session user.",
603 "parameters": [ 778 "parameters": [
604 { 779 {
605 "type": "string", 780 "type": "string",
@@ -643,15 +818,60 @@ const docTemplate = `{
643 } 818 }
644 } 819 }
645 }, 820 },
821 "/rankings": {
822 "get": {
823 "description": "Get rankings of every player.",
824 "produces": [
825 "application/json"
826 ],
827 "tags": [
828 "rankings"
829 ],
830 "responses": {
831 "200": {
832 "description": "OK",
833 "schema": {
834 "allOf": [
835 {
836 "$ref": "#/definitions/models.Response"
837 },
838 {
839 "type": "object",
840 "properties": {
841 "data": {
842 "$ref": "#/definitions/models.RankingsResponse"
843 }
844 }
845 }
846 ]
847 }
848 },
849 "400": {
850 "description": "Bad Request",
851 "schema": {
852 "$ref": "#/definitions/models.Response"
853 }
854 }
855 }
856 }
857 },
646 "/search": { 858 "/search": {
647 "get": { 859 "get": {
860 "description": "Get all user and map data matching to the query.",
648 "produces": [ 861 "produces": [
649 "application/json" 862 "application/json"
650 ], 863 ],
651 "tags": [ 864 "tags": [
652 "search" 865 "search"
653 ], 866 ],
654 "summary": "Get all user and map data.", 867 "parameters": [
868 {
869 "type": "string",
870 "description": "Search user or map name.",
871 "name": "q",
872 "in": "query"
873 }
874 ],
655 "responses": { 875 "responses": {
656 "200": { 876 "200": {
657 "description": "OK", 877 "description": "OK",
@@ -682,13 +902,13 @@ const docTemplate = `{
682 }, 902 },
683 "/token": { 903 "/token": {
684 "get": { 904 "get": {
905 "description": "Gets the token cookie value from the user.",
685 "produces": [ 906 "produces": [
686 "application/json" 907 "application/json"
687 ], 908 ],
688 "tags": [ 909 "tags": [
689 "auth" 910 "auth"
690 ], 911 ],
691 "summary": "Gets the token cookie value from the user.",
692 "responses": { 912 "responses": {
693 "200": { 913 "200": {
694 "description": "OK", 914 "description": "OK",
@@ -717,13 +937,13 @@ const docTemplate = `{
717 } 937 }
718 }, 938 },
719 "delete": { 939 "delete": {
940 "description": "Deletes the token cookie from the user.",
720 "produces": [ 941 "produces": [
721 "application/json" 942 "application/json"
722 ], 943 ],
723 "tags": [ 944 "tags": [
724 "auth" 945 "auth"
725 ], 946 ],
726 "summary": "Deletes the token cookie from the user.",
727 "responses": { 947 "responses": {
728 "200": { 948 "200": {
729 "description": "OK", 949 "description": "OK",
@@ -754,6 +974,7 @@ const docTemplate = `{
754 }, 974 },
755 "/users/{id}": { 975 "/users/{id}": {
756 "get": { 976 "get": {
977 "description": "Get profile page of another user.",
757 "consumes": [ 978 "consumes": [
758 "application/json" 979 "application/json"
759 ], 980 ],
@@ -763,7 +984,6 @@ const docTemplate = `{
763 "tags": [ 984 "tags": [
764 "users" 985 "users"
765 ], 986 ],
766 "summary": "Get profile page of another user.",
767 "parameters": [ 987 "parameters": [
768 { 988 {
769 "type": "integer", 989 "type": "integer",
@@ -809,6 +1029,17 @@ const docTemplate = `{
809 } 1029 }
810 }, 1030 },
811 "definitions": { 1031 "definitions": {
1032 "models.Category": {
1033 "type": "object",
1034 "properties": {
1035 "id": {
1036 "type": "integer"
1037 },
1038 "name": {
1039 "type": "string"
1040 }
1041 }
1042 },
812 "models.Chapter": { 1043 "models.Chapter": {
813 "type": "object", 1044 "type": "object",
814 "properties": { 1045 "properties": {
@@ -848,12 +1079,97 @@ const docTemplate = `{
848 } 1079 }
849 } 1080 }
850 }, 1081 },
1082 "models.CreateMapSummaryRequest": {
1083 "type": "object",
1084 "required": [
1085 "category_id",
1086 "description",
1087 "record_date",
1088 "score_count",
1089 "user_name"
1090 ],
1091 "properties": {
1092 "category_id": {
1093 "type": "integer"
1094 },
1095 "description": {
1096 "type": "string"
1097 },
1098 "record_date": {
1099 "type": "string"
1100 },
1101 "score_count": {
1102 "type": "integer"
1103 },
1104 "showcase": {
1105 "type": "string"
1106 },
1107 "user_name": {
1108 "type": "string"
1109 }
1110 }
1111 },
1112 "models.DeleteMapSummaryRequest": {
1113 "type": "object",
1114 "required": [
1115 "route_id"
1116 ],
1117 "properties": {
1118 "route_id": {
1119 "type": "integer"
1120 }
1121 }
1122 },
1123 "models.EditMapImageRequest": {
1124 "type": "object",
1125 "required": [
1126 "image"
1127 ],
1128 "properties": {
1129 "image": {
1130 "type": "string"
1131 }
1132 }
1133 },
1134 "models.EditMapSummaryRequest": {
1135 "type": "object",
1136 "required": [
1137 "description",
1138 "record_date",
1139 "route_id",
1140 "score_count",
1141 "user_name"
1142 ],
1143 "properties": {
1144 "description": {
1145 "type": "string"
1146 },
1147 "record_date": {
1148 "type": "string"
1149 },
1150 "route_id": {
1151 "type": "integer"
1152 },
1153 "score_count": {
1154 "type": "integer"
1155 },
1156 "showcase": {
1157 "type": "string"
1158 },
1159 "user_name": {
1160 "type": "string"
1161 }
1162 }
1163 },
851 "models.Game": { 1164 "models.Game": {
852 "type": "object", 1165 "type": "object",
853 "properties": { 1166 "properties": {
854 "id": { 1167 "id": {
855 "type": "integer" 1168 "type": "integer"
856 }, 1169 },
1170 "is_coop": {
1171 "type": "boolean"
1172 },
857 "name": { 1173 "name": {
858 "type": "string" 1174 "type": "string"
859 } 1175 }
@@ -873,32 +1189,20 @@ const docTemplate = `{
873 "chapter_name": { 1189 "chapter_name": {
874 "type": "string" 1190 "type": "string"
875 }, 1191 },
876 "data": {},
877 "game_name": { 1192 "game_name": {
878 "type": "string" 1193 "type": "string"
879 }, 1194 },
880 "id": { 1195 "id": {
881 "type": "integer" 1196 "type": "integer"
882 }, 1197 },
883 "map_name": { 1198 "image": {
884 "type": "string" 1199 "type": "string"
885 }
886 }
887 },
888 "models.MapCategoryScores": {
889 "type": "object",
890 "properties": {
891 "any": {
892 "type": "integer"
893 }, 1200 },
894 "cm": { 1201 "is_coop": {
895 "type": "integer" 1202 "type": "boolean"
896 },
897 "inbounds_sla": {
898 "type": "integer"
899 }, 1203 },
900 "no_sla": { 1204 "map_name": {
901 "type": "integer" 1205 "type": "string"
902 } 1206 }
903 } 1207 }
904 }, 1208 },
@@ -922,6 +1226,29 @@ const docTemplate = `{
922 "records": {} 1226 "records": {}
923 } 1227 }
924 }, 1228 },
1229 "models.MapRoute": {
1230 "type": "object",
1231 "properties": {
1232 "category": {
1233 "$ref": "#/definitions/models.Category"
1234 },
1235 "description": {
1236 "type": "string"
1237 },
1238 "history": {
1239 "$ref": "#/definitions/models.MapHistory"
1240 },
1241 "rating": {
1242 "type": "number"
1243 },
1244 "route_id": {
1245 "type": "integer"
1246 },
1247 "showcase": {
1248 "type": "string"
1249 }
1250 }
1251 },
925 "models.MapShort": { 1252 "models.MapShort": {
926 "type": "object", 1253 "type": "object",
927 "properties": { 1254 "properties": {
@@ -936,29 +1263,22 @@ const docTemplate = `{
936 "models.MapSummary": { 1263 "models.MapSummary": {
937 "type": "object", 1264 "type": "object",
938 "properties": { 1265 "properties": {
939 "category_scores": { 1266 "routes": {
940 "$ref": "#/definitions/models.MapCategoryScores"
941 },
942 "description": {
943 "type": "string"
944 },
945 "history": {
946 "type": "array",
947 "items": {
948 "$ref": "#/definitions/models.MapHistory"
949 }
950 },
951 "rating": {
952 "type": "number"
953 },
954 "routers": {
955 "type": "array", 1267 "type": "array",
956 "items": { 1268 "items": {
957 "type": "string" 1269 "$ref": "#/definitions/models.MapRoute"
958 } 1270 }
1271 }
1272 }
1273 },
1274 "models.MapSummaryResponse": {
1275 "type": "object",
1276 "properties": {
1277 "map": {
1278 "$ref": "#/definitions/models.Map"
959 }, 1279 },
960 "showcase": { 1280 "summary": {
961 "type": "string" 1281 "$ref": "#/definitions/models.MapSummary"
962 } 1282 }
963 } 1283 }
964 }, 1284 },
@@ -1011,21 +1331,9 @@ const docTemplate = `{
1011 } 1331 }
1012 } 1332 }
1013 }, 1333 },
1014 "models.RecordRequest": { 1334 "models.RecordResponse": {
1015 "type": "object", 1335 "type": "object",
1016 "required": [
1017 "is_partner_orange",
1018 "partner_id",
1019 "score_count",
1020 "score_time"
1021 ],
1022 "properties": { 1336 "properties": {
1023 "is_partner_orange": {
1024 "type": "boolean"
1025 },
1026 "partner_id": {
1027 "type": "string"
1028 },
1029 "score_count": { 1337 "score_count": {
1030 "type": "integer" 1338 "type": "integer"
1031 }, 1339 },
@@ -1061,29 +1369,13 @@ const docTemplate = `{
1061 "maps": { 1369 "maps": {
1062 "type": "array", 1370 "type": "array",
1063 "items": { 1371 "items": {
1064 "type": "object", 1372 "$ref": "#/definitions/models.MapShort"
1065 "properties": {
1066 "id": {
1067 "type": "integer"
1068 },
1069 "name": {
1070 "type": "string"
1071 }
1072 }
1073 } 1373 }
1074 }, 1374 },
1075 "players": { 1375 "players": {
1076 "type": "array", 1376 "type": "array",
1077 "items": { 1377 "items": {
1078 "type": "object", 1378 "$ref": "#/definitions/models.UserShort"
1079 "properties": {
1080 "steam_id": {
1081 "type": "string"
1082 },
1083 "user_name": {
1084 "type": "string"
1085 }
1086 }
1087 } 1379 }
1088 } 1380 }
1089 } 1381 }
@@ -1101,6 +1393,17 @@ const docTemplate = `{
1101 "type": "string" 1393 "type": "string"
1102 } 1394 }
1103 } 1395 }
1396 },
1397 "models.UserShort": {
1398 "type": "object",
1399 "properties": {
1400 "steam_id": {
1401 "type": "string"
1402 },
1403 "user_name": {
1404 "type": "string"
1405 }
1406 }
1104 } 1407 }
1105 } 1408 }
1106}` 1409}`
diff --git a/docs/swagger.json b/docs/swagger.json
index ad2a659..2e1a789 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -15,13 +15,13 @@
15 "paths": { 15 "paths": {
16 "/chapters/{id}": { 16 "/chapters/{id}": {
17 "get": { 17 "get": {
18 "description": "Get maps from the specified chapter id.",
18 "produces": [ 19 "produces": [
19 "application/json" 20 "application/json"
20 ], 21 ],
21 "tags": [ 22 "tags": [
22 "games \u0026 chapters" 23 "games \u0026 chapters"
23 ], 24 ],
24 "summary": "Get maps from the specified chapter id.",
25 "parameters": [ 25 "parameters": [
26 { 26 {
27 "type": "integer", 27 "type": "integer",
@@ -59,45 +59,9 @@
59 } 59 }
60 } 60 }
61 }, 61 },
62 "/demo": {
63 "get": {
64 "produces": [
65 "application/json"
66 ],
67 "tags": [
68 "rankings"
69 ],
70 "summary": "Get rankings of every player.",
71 "responses": {
72 "200": {
73 "description": "OK",
74 "schema": {
75 "allOf": [
76 {
77 "$ref": "#/definitions/models.Response"
78 },
79 {
80 "type": "object",
81 "properties": {
82 "data": {
83 "$ref": "#/definitions/models.RankingsResponse"
84 }
85 }
86 }
87 ]
88 }
89 },
90 "400": {
91 "description": "Bad Request",
92 "schema": {
93 "$ref": "#/definitions/models.Response"
94 }
95 }
96 }
97 }
98 },
99 "/demos": { 62 "/demos": {
100 "get": { 63 "get": {
64 "description": "Get demo with specified demo uuid.",
101 "consumes": [ 65 "consumes": [
102 "application/json" 66 "application/json"
103 ], 67 ],
@@ -107,10 +71,9 @@
107 "tags": [ 71 "tags": [
108 "demo" 72 "demo"
109 ], 73 ],
110 "summary": "Get demo with specified demo uuid.",
111 "parameters": [ 74 "parameters": [
112 { 75 {
113 "type": "integer", 76 "type": "string",
114 "description": "Demo UUID", 77 "description": "Demo UUID",
115 "name": "uuid", 78 "name": "uuid",
116 "in": "query", 79 "in": "query",
@@ -135,13 +98,13 @@
135 }, 98 },
136 "/games": { 99 "/games": {
137 "get": { 100 "get": {
101 "description": "Get games from the leaderboards.",
138 "produces": [ 102 "produces": [
139 "application/json" 103 "application/json"
140 ], 104 ],
141 "tags": [ 105 "tags": [
142 "games \u0026 chapters" 106 "games \u0026 chapters"
143 ], 107 ],
144 "summary": "Get games from the leaderboards.",
145 "responses": { 108 "responses": {
146 "200": { 109 "200": {
147 "description": "OK", 110 "description": "OK",
@@ -175,13 +138,13 @@
175 }, 138 },
176 "/games/{id}": { 139 "/games/{id}": {
177 "get": { 140 "get": {
141 "description": "Get chapters from the specified game id.",
178 "produces": [ 142 "produces": [
179 "application/json" 143 "application/json"
180 ], 144 ],
181 "tags": [ 145 "tags": [
182 "games \u0026 chapters" 146 "games \u0026 chapters"
183 ], 147 ],
184 "summary": "Get chapters from the specified game id.",
185 "parameters": [ 148 "parameters": [
186 { 149 {
187 "type": "integer", 150 "type": "integer",
@@ -221,6 +184,7 @@
221 }, 184 },
222 "/login": { 185 "/login": {
223 "get": { 186 "get": {
187 "description": "Get (redirect) login page for Steam auth.",
224 "consumes": [ 188 "consumes": [
225 "application/json" 189 "application/json"
226 ], 190 ],
@@ -230,7 +194,6 @@
230 "tags": [ 194 "tags": [
231 "login" 195 "login"
232 ], 196 ],
233 "summary": "Get (redirect) login page for Steam auth.",
234 "responses": { 197 "responses": {
235 "200": { 198 "200": {
236 "description": "OK", 199 "description": "OK",
@@ -259,15 +222,77 @@
259 } 222 }
260 } 223 }
261 }, 224 },
225 "/maps/{id}/image": {
226 "put": {
227 "description": "Edit map image with specified map id.",
228 "produces": [
229 "application/json"
230 ],
231 "tags": [
232 "maps"
233 ],
234 "parameters": [
235 {
236 "type": "string",
237 "description": "JWT Token",
238 "name": "Authorization",
239 "in": "header",
240 "required": true
241 },
242 {
243 "type": "integer",
244 "description": "Map ID",
245 "name": "id",
246 "in": "path",
247 "required": true
248 },
249 {
250 "description": "Body",
251 "name": "request",
252 "in": "body",
253 "required": true,
254 "schema": {
255 "$ref": "#/definitions/models.EditMapImageRequest"
256 }
257 }
258 ],
259 "responses": {
260 "200": {
261 "description": "OK",
262 "schema": {
263 "allOf": [
264 {
265 "$ref": "#/definitions/models.Response"
266 },
267 {
268 "type": "object",
269 "properties": {
270 "data": {
271 "$ref": "#/definitions/models.EditMapImageRequest"
272 }
273 }
274 }
275 ]
276 }
277 },
278 "400": {
279 "description": "Bad Request",
280 "schema": {
281 "$ref": "#/definitions/models.Response"
282 }
283 }
284 }
285 }
286 },
262 "/maps/{id}/leaderboards": { 287 "/maps/{id}/leaderboards": {
263 "get": { 288 "get": {
289 "description": "Get map leaderboards with specified id.",
264 "produces": [ 290 "produces": [
265 "application/json" 291 "application/json"
266 ], 292 ],
267 "tags": [ 293 "tags": [
268 "maps" 294 "maps"
269 ], 295 ],
270 "summary": "Get map leaderboards with specified id.",
271 "parameters": [ 296 "parameters": [
272 { 297 {
273 "type": "integer", 298 "type": "integer",
@@ -319,6 +344,7 @@
319 }, 344 },
320 "/maps/{id}/record": { 345 "/maps/{id}/record": {
321 "post": { 346 "post": {
347 "description": "Post record with demo of a specific map.",
322 "consumes": [ 348 "consumes": [
323 "multipart/form-data" 349 "multipart/form-data"
324 ], 350 ],
@@ -328,9 +354,15 @@
328 "tags": [ 354 "tags": [
329 "maps" 355 "maps"
330 ], 356 ],
331 "summary": "Post record with demo of a specific map.",
332 "parameters": [ 357 "parameters": [
333 { 358 {
359 "type": "integer",
360 "description": "Map ID",
361 "name": "id",
362 "in": "path",
363 "required": true
364 },
365 {
334 "type": "string", 366 "type": "string",
335 "description": "JWT Token", 367 "description": "JWT Token",
336 "name": "Authorization", 368 "name": "Authorization",
@@ -338,42 +370,29 @@
338 "required": true 370 "required": true
339 }, 371 },
340 { 372 {
341 "type": "array", 373 "type": "file",
342 "items": { 374 "description": "Host Demo",
343 "type": "file" 375 "name": "host_demo",
344 },
345 "description": "Demos",
346 "name": "demos",
347 "in": "formData", 376 "in": "formData",
348 "required": true 377 "required": true
349 }, 378 },
350 { 379 {
351 "type": "integer", 380 "type": "file",
352 "description": "Score Count", 381 "description": "Partner Demo",
353 "name": "score_count", 382 "name": "partner_demo",
354 "in": "formData", 383 "in": "formData"
355 "required": true
356 },
357 {
358 "type": "integer",
359 "description": "Score Time",
360 "name": "score_time",
361 "in": "formData",
362 "required": true
363 }, 384 },
364 { 385 {
365 "type": "boolean", 386 "type": "boolean",
366 "description": "Is Partner Orange", 387 "description": "Is Partner Orange",
367 "name": "is_partner_orange", 388 "name": "is_partner_orange",
368 "in": "formData", 389 "in": "formData"
369 "required": true
370 }, 390 },
371 { 391 {
372 "type": "string", 392 "type": "string",
373 "description": "Partner ID", 393 "description": "Partner ID",
374 "name": "partner_id", 394 "name": "partner_id",
375 "in": "formData", 395 "in": "formData"
376 "required": true
377 } 396 }
378 ], 397 ],
379 "responses": { 398 "responses": {
@@ -388,7 +407,7 @@
388 "type": "object", 407 "type": "object",
389 "properties": { 408 "properties": {
390 "data": { 409 "data": {
391 "$ref": "#/definitions/models.RecordRequest" 410 "$ref": "#/definitions/models.RecordResponse"
392 } 411 }
393 } 412 }
394 } 413 }
@@ -412,13 +431,13 @@
412 }, 431 },
413 "/maps/{id}/summary": { 432 "/maps/{id}/summary": {
414 "get": { 433 "get": {
434 "description": "Get map summary with specified id.",
415 "produces": [ 435 "produces": [
416 "application/json" 436 "application/json"
417 ], 437 ],
418 "tags": [ 438 "tags": [
419 "maps" 439 "maps"
420 ], 440 ],
421 "summary": "Get map summary with specified id.",
422 "parameters": [ 441 "parameters": [
423 { 442 {
424 "type": "integer", 443 "type": "integer",
@@ -440,19 +459,187 @@
440 "type": "object", 459 "type": "object",
441 "properties": { 460 "properties": {
442 "data": { 461 "data": {
443 "allOf": [ 462 "$ref": "#/definitions/models.MapSummaryResponse"
444 { 463 }
445 "$ref": "#/definitions/models.Map" 464 }
446 }, 465 }
447 { 466 ]
448 "type": "object", 467 }
449 "properties": { 468 },
450 "data": { 469 "400": {
451 "$ref": "#/definitions/models.MapSummary" 470 "description": "Bad Request",
452 } 471 "schema": {
453 } 472 "$ref": "#/definitions/models.Response"
454 } 473 }
455 ] 474 }
475 }
476 },
477 "put": {
478 "description": "Edit map summary with specified map id.",
479 "produces": [
480 "application/json"
481 ],
482 "tags": [
483 "maps"
484 ],
485 "parameters": [
486 {
487 "type": "string",
488 "description": "JWT Token",
489 "name": "Authorization",
490 "in": "header",
491 "required": true
492 },
493 {
494 "type": "integer",
495 "description": "Map ID",
496 "name": "id",
497 "in": "path",
498 "required": true
499 },
500 {
501 "description": "Body",
502 "name": "request",
503 "in": "body",
504 "required": true,
505 "schema": {
506 "$ref": "#/definitions/models.EditMapSummaryRequest"
507 }
508 }
509 ],
510 "responses": {
511 "200": {
512 "description": "OK",
513 "schema": {
514 "allOf": [
515 {
516 "$ref": "#/definitions/models.Response"
517 },
518 {
519 "type": "object",
520 "properties": {
521 "data": {
522 "$ref": "#/definitions/models.EditMapSummaryRequest"
523 }
524 }
525 }
526 ]
527 }
528 },
529 "400": {
530 "description": "Bad Request",
531 "schema": {
532 "$ref": "#/definitions/models.Response"
533 }
534 }
535 }
536 },
537 "post": {
538 "description": "Create map summary with specified map id.",
539 "produces": [
540 "application/json"
541 ],
542 "tags": [
543 "maps"
544 ],
545 "parameters": [
546 {
547 "type": "string",
548 "description": "JWT Token",
549 "name": "Authorization",
550 "in": "header",
551 "required": true
552 },
553 {
554 "type": "integer",
555 "description": "Map ID",
556 "name": "id",
557 "in": "path",
558 "required": true
559 },
560 {
561 "description": "Body",
562 "name": "request",
563 "in": "body",
564 "required": true,
565 "schema": {
566 "$ref": "#/definitions/models.CreateMapSummaryRequest"
567 }
568 }
569 ],
570 "responses": {
571 "200": {
572 "description": "OK",
573 "schema": {
574 "allOf": [
575 {
576 "$ref": "#/definitions/models.Response"
577 },
578 {
579 "type": "object",
580 "properties": {
581 "data": {
582 "$ref": "#/definitions/models.CreateMapSummaryRequest"
583 }
584 }
585 }
586 ]
587 }
588 },
589 "400": {
590 "description": "Bad Request",
591 "schema": {
592 "$ref": "#/definitions/models.Response"
593 }
594 }
595 }
596 },
597 "delete": {
598 "description": "Delete map summary with specified map id.",
599 "produces": [
600 "application/json"
601 ],
602 "tags": [
603 "maps"
604 ],
605 "parameters": [
606 {
607 "type": "string",
608 "description": "JWT Token",
609 "name": "Authorization",
610 "in": "header",
611 "required": true
612 },
613 {
614 "type": "integer",
615 "description": "Map ID",
616 "name": "id",
617 "in": "path",
618 "required": true
619 },
620 {
621 "description": "Body",
622 "name": "request",
623 "in": "body",
624 "required": true,
625 "schema": {
626 "$ref": "#/definitions/models.DeleteMapSummaryRequest"
627 }
628 }
629 ],
630 "responses": {
631 "200": {
632 "description": "OK",
633 "schema": {
634 "allOf": [
635 {
636 "$ref": "#/definitions/models.Response"
637 },
638 {
639 "type": "object",
640 "properties": {
641 "data": {
642 "$ref": "#/definitions/models.DeleteMapSummaryRequest"
456 } 643 }
457 } 644 }
458 } 645 }
@@ -470,6 +657,7 @@
470 }, 657 },
471 "/profile": { 658 "/profile": {
472 "get": { 659 "get": {
660 "description": "Get profile page of session user.",
473 "consumes": [ 661 "consumes": [
474 "application/json" 662 "application/json"
475 ], 663 ],
@@ -479,7 +667,6 @@
479 "tags": [ 667 "tags": [
480 "users" 668 "users"
481 ], 669 ],
482 "summary": "Get profile page of session user.",
483 "parameters": [ 670 "parameters": [
484 { 671 {
485 "type": "string", 672 "type": "string",
@@ -523,6 +710,7 @@
523 } 710 }
524 }, 711 },
525 "put": { 712 "put": {
713 "description": "Update country code of session user.",
526 "consumes": [ 714 "consumes": [
527 "application/json" 715 "application/json"
528 ], 716 ],
@@ -532,7 +720,6 @@
532 "tags": [ 720 "tags": [
533 "users" 721 "users"
534 ], 722 ],
535 "summary": "Update country code of session user.",
536 "parameters": [ 723 "parameters": [
537 { 724 {
538 "type": "string", 725 "type": "string",
@@ -553,19 +740,7 @@
553 "200": { 740 "200": {
554 "description": "OK", 741 "description": "OK",
555 "schema": { 742 "schema": {
556 "allOf": [ 743 "$ref": "#/definitions/models.Response"
557 {
558 "$ref": "#/definitions/models.Response"
559 },
560 {
561 "type": "object",
562 "properties": {
563 "data": {
564 "$ref": "#/definitions/models.ProfileResponse"
565 }
566 }
567 }
568 ]
569 } 744 }
570 }, 745 },
571 "400": { 746 "400": {
@@ -583,6 +758,7 @@
583 } 758 }
584 }, 759 },
585 "post": { 760 "post": {
761 "description": "Update profile page of session user.",
586 "consumes": [ 762 "consumes": [
587 "application/json" 763 "application/json"
588 ], 764 ],
@@ -592,7 +768,6 @@
592 "tags": [ 768 "tags": [
593 "users" 769 "users"
594 ], 770 ],
595 "summary": "Update profile page of session user.",
596 "parameters": [ 771 "parameters": [
597 { 772 {
598 "type": "string", 773 "type": "string",
@@ -636,15 +811,60 @@
636 } 811 }
637 } 812 }
638 }, 813 },
814 "/rankings": {
815 "get": {
816 "description": "Get rankings of every player.",
817 "produces": [
818 "application/json"
819 ],
820 "tags": [
821 "rankings"
822 ],
823 "responses": {
824 "200": {
825 "description": "OK",
826 "schema": {
827 "allOf": [
828 {
829 "$ref": "#/definitions/models.Response"
830 },
831 {
832 "type": "object",
833 "properties": {
834 "data": {
835 "$ref": "#/definitions/models.RankingsResponse"
836 }
837 }
838 }
839 ]
840 }
841 },
842 "400": {
843 "description": "Bad Request",
844 "schema": {
845 "$ref": "#/definitions/models.Response"
846 }
847 }
848 }
849 }
850 },
639 "/search": { 851 "/search": {
640 "get": { 852 "get": {
853 "description": "Get all user and map data matching to the query.",
641 "produces": [ 854 "produces": [
642 "application/json" 855 "application/json"
643 ], 856 ],
644 "tags": [ 857 "tags": [
645 "search" 858 "search"
646 ], 859 ],
647 "summary": "Get all user and map data.", 860 "parameters": [
861 {
862 "type": "string",
863 "description": "Search user or map name.",
864 "name": "q",
865 "in": "query"
866 }
867 ],
648 "responses": { 868 "responses": {
649 "200": { 869 "200": {
650 "description": "OK", 870 "description": "OK",
@@ -675,13 +895,13 @@
675 }, 895 },
676 "/token": { 896 "/token": {
677 "get": { 897 "get": {
898 "description": "Gets the token cookie value from the user.",
678 "produces": [ 899 "produces": [
679 "application/json" 900 "application/json"
680 ], 901 ],
681 "tags": [ 902 "tags": [
682 "auth" 903 "auth"
683 ], 904 ],
684 "summary": "Gets the token cookie value from the user.",
685 "responses": { 905 "responses": {
686 "200": { 906 "200": {
687 "description": "OK", 907 "description": "OK",
@@ -710,13 +930,13 @@
710 } 930 }
711 }, 931 },
712 "delete": { 932 "delete": {
933 "description": "Deletes the token cookie from the user.",
713 "produces": [ 934 "produces": [
714 "application/json" 935 "application/json"
715 ], 936 ],
716 "tags": [ 937 "tags": [
717 "auth" 938 "auth"
718 ], 939 ],
719 "summary": "Deletes the token cookie from the user.",
720 "responses": { 940 "responses": {
721 "200": { 941 "200": {
722 "description": "OK", 942 "description": "OK",
@@ -747,6 +967,7 @@
747 }, 967 },
748 "/users/{id}": { 968 "/users/{id}": {
749 "get": { 969 "get": {
970 "description": "Get profile page of another user.",
750 "consumes": [ 971 "consumes": [
751 "application/json" 972 "application/json"
752 ], 973 ],
@@ -756,7 +977,6 @@
756 "tags": [ 977 "tags": [
757 "users" 978 "users"
758 ], 979 ],
759 "summary": "Get profile page of another user.",
760 "parameters": [ 980 "parameters": [
761 { 981 {
762 "type": "integer", 982 "type": "integer",
@@ -802,6 +1022,17 @@
802 } 1022 }
803 }, 1023 },
804 "definitions": { 1024 "definitions": {
1025 "models.Category": {
1026 "type": "object",
1027 "properties": {
1028 "id": {
1029 "type": "integer"
1030 },
1031 "name": {
1032 "type": "string"
1033 }
1034 }
1035 },
805 "models.Chapter": { 1036 "models.Chapter": {
806 "type": "object", 1037 "type": "object",
807 "properties": { 1038 "properties": {
@@ -841,12 +1072,97 @@
841 } 1072 }
842 } 1073 }
843 }, 1074 },
1075 "models.CreateMapSummaryRequest": {
1076 "type": "object",
1077 "required": [
1078 "category_id",
1079 "description",
1080 "record_date",
1081 "score_count",
1082 "user_name"
1083 ],
1084 "properties": {
1085 "category_id": {
1086 "type": "integer"
1087 },
1088 "description": {
1089 "type": "string"
1090 },
1091 "record_date": {
1092 "type": "string"
1093 },
1094 "score_count": {
1095 "type": "integer"
1096 },
1097 "showcase": {
1098 "type": "string"
1099 },
1100 "user_name": {
1101 "type": "string"
1102 }
1103 }
1104 },
1105 "models.DeleteMapSummaryRequest": {
1106 "type": "object",
1107 "required": [
1108 "route_id"
1109 ],
1110 "properties": {
1111 "route_id": {
1112 "type": "integer"
1113 }
1114 }
1115 },
1116 "models.EditMapImageRequest": {
1117 "type": "object",
1118 "required": [
1119 "image"
1120 ],
1121 "properties": {
1122 "image": {
1123 "type": "string"
1124 }
1125 }
1126 },
1127 "models.EditMapSummaryRequest": {
1128 "type": "object",
1129 "required": [
1130 "description",
1131 "record_date",
1132 "route_id",
1133 "score_count",
1134 "user_name"
1135 ],
1136 "properties": {
1137 "description": {
1138 "type": "string"
1139 },
1140 "record_date": {
1141 "type": "string"
1142 },
1143 "route_id": {
1144 "type": "integer"
1145 },
1146 "score_count": {
1147 "type": "integer"
1148 },
1149 "showcase": {
1150 "type": "string"
1151 },
1152 "user_name": {
1153 "type": "string"
1154 }
1155 }
1156 },
844 "models.Game": { 1157 "models.Game": {
845 "type": "object", 1158 "type": "object",
846 "properties": { 1159 "properties": {
847 "id": { 1160 "id": {
848 "type": "integer" 1161 "type": "integer"
849 }, 1162 },
1163 "is_coop": {
1164 "type": "boolean"
1165 },
850 "name": { 1166 "name": {
851 "type": "string" 1167 "type": "string"
852 } 1168 }
@@ -866,32 +1182,20 @@
866 "chapter_name": { 1182 "chapter_name": {
867 "type": "string" 1183 "type": "string"
868 }, 1184 },
869 "data": {},
870 "game_name": { 1185 "game_name": {
871 "type": "string" 1186 "type": "string"
872 }, 1187 },
873 "id": { 1188 "id": {
874 "type": "integer" 1189 "type": "integer"
875 }, 1190 },
876 "map_name": { 1191 "image": {
877 "type": "string" 1192 "type": "string"
878 }
879 }
880 },
881 "models.MapCategoryScores": {
882 "type": "object",
883 "properties": {
884 "any": {
885 "type": "integer"
886 }, 1193 },
887 "cm": { 1194 "is_coop": {
888 "type": "integer" 1195 "type": "boolean"
889 },
890 "inbounds_sla": {
891 "type": "integer"
892 }, 1196 },
893 "no_sla": { 1197 "map_name": {
894 "type": "integer" 1198 "type": "string"
895 } 1199 }
896 } 1200 }
897 }, 1201 },
@@ -915,6 +1219,29 @@
915 "records": {} 1219 "records": {}
916 } 1220 }
917 }, 1221 },
1222 "models.MapRoute": {
1223 "type": "object",
1224 "properties": {
1225 "category": {
1226 "$ref": "#/definitions/models.Category"
1227 },
1228 "description": {
1229 "type": "string"
1230 },
1231 "history": {
1232 "$ref": "#/definitions/models.MapHistory"
1233 },
1234 "rating": {
1235 "type": "number"
1236 },
1237 "route_id": {
1238 "type": "integer"
1239 },
1240 "showcase": {
1241 "type": "string"
1242 }
1243 }
1244 },
918 "models.MapShort": { 1245 "models.MapShort": {
919 "type": "object", 1246 "type": "object",
920 "properties": { 1247 "properties": {
@@ -929,29 +1256,22 @@
929 "models.MapSummary": { 1256 "models.MapSummary": {
930 "type": "object", 1257 "type": "object",
931 "properties": { 1258 "properties": {
932 "category_scores": { 1259 "routes": {
933 "$ref": "#/definitions/models.MapCategoryScores"
934 },
935 "description": {
936 "type": "string"
937 },
938 "history": {
939 "type": "array",
940 "items": {
941 "$ref": "#/definitions/models.MapHistory"
942 }
943 },
944 "rating": {
945 "type": "number"
946 },
947 "routers": {
948 "type": "array", 1260 "type": "array",
949 "items": { 1261 "items": {
950 "type": "string" 1262 "$ref": "#/definitions/models.MapRoute"
951 } 1263 }
1264 }
1265 }
1266 },
1267 "models.MapSummaryResponse": {
1268 "type": "object",
1269 "properties": {
1270 "map": {
1271 "$ref": "#/definitions/models.Map"
952 }, 1272 },
953 "showcase": { 1273 "summary": {
954 "type": "string" 1274 "$ref": "#/definitions/models.MapSummary"
955 } 1275 }
956 } 1276 }
957 }, 1277 },
@@ -1004,21 +1324,9 @@
1004 } 1324 }
1005 } 1325 }
1006 }, 1326 },
1007 "models.RecordRequest": { 1327 "models.RecordResponse": {
1008 "type": "object", 1328 "type": "object",
1009 "required": [
1010 "is_partner_orange",
1011 "partner_id",
1012 "score_count",
1013 "score_time"
1014 ],
1015 "properties": { 1329 "properties": {
1016 "is_partner_orange": {
1017 "type": "boolean"
1018 },
1019 "partner_id": {
1020 "type": "string"
1021 },
1022 "score_count": { 1330 "score_count": {
1023 "type": "integer" 1331 "type": "integer"
1024 }, 1332 },
@@ -1054,29 +1362,13 @@
1054 "maps": { 1362 "maps": {
1055 "type": "array", 1363 "type": "array",
1056 "items": { 1364 "items": {
1057 "type": "object", 1365 "$ref": "#/definitions/models.MapShort"
1058 "properties": {
1059 "id": {
1060 "type": "integer"
1061 },
1062 "name": {
1063 "type": "string"
1064 }
1065 }
1066 } 1366 }
1067 }, 1367 },
1068 "players": { 1368 "players": {
1069 "type": "array", 1369 "type": "array",
1070 "items": { 1370 "items": {
1071 "type": "object", 1371 "$ref": "#/definitions/models.UserShort"
1072 "properties": {
1073 "steam_id": {
1074 "type": "string"
1075 },
1076 "user_name": {
1077 "type": "string"
1078 }
1079 }
1080 } 1372 }
1081 } 1373 }
1082 } 1374 }
@@ -1094,6 +1386,17 @@
1094 "type": "string" 1386 "type": "string"
1095 } 1387 }
1096 } 1388 }
1389 },
1390 "models.UserShort": {
1391 "type": "object",
1392 "properties": {
1393 "steam_id": {
1394 "type": "string"
1395 },
1396 "user_name": {
1397 "type": "string"
1398 }
1399 }
1097 } 1400 }
1098 } 1401 }
1099} \ No newline at end of file 1402} \ No newline at end of file
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index d62b46b..7571073 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -1,5 +1,12 @@
1basePath: /v1 1basePath: /v1
2definitions: 2definitions:
3 models.Category:
4 properties:
5 id:
6 type: integer
7 name:
8 type: string
9 type: object
3 models.Chapter: 10 models.Chapter:
4 properties: 11 properties:
5 id: 12 id:
@@ -25,10 +32,68 @@ definitions:
25 game: 32 game:
26 $ref: '#/definitions/models.Game' 33 $ref: '#/definitions/models.Game'
27 type: object 34 type: object
35 models.CreateMapSummaryRequest:
36 properties:
37 category_id:
38 type: integer
39 description:
40 type: string
41 record_date:
42 type: string
43 score_count:
44 type: integer
45 showcase:
46 type: string
47 user_name:
48 type: string
49 required:
50 - category_id
51 - description
52 - record_date
53 - score_count
54 - user_name
55 type: object
56 models.DeleteMapSummaryRequest:
57 properties:
58 route_id:
59 type: integer
60 required:
61 - route_id
62 type: object
63 models.EditMapImageRequest:
64 properties:
65 image:
66 type: string
67 required:
68 - image
69 type: object
70 models.EditMapSummaryRequest:
71 properties:
72 description:
73 type: string
74 record_date:
75 type: string
76 route_id:
77 type: integer
78 score_count:
79 type: integer
80 showcase:
81 type: string
82 user_name:
83 type: string
84 required:
85 - description
86 - record_date
87 - route_id
88 - score_count
89 - user_name
90 type: object
28 models.Game: 91 models.Game:
29 properties: 92 properties:
30 id: 93 id:
31 type: integer 94 type: integer
95 is_coop:
96 type: boolean
32 name: 97 name:
33 type: string 98 type: string
34 type: object 99 type: object
@@ -41,25 +106,17 @@ definitions:
41 properties: 106 properties:
42 chapter_name: 107 chapter_name:
43 type: string 108 type: string
44 data: {}
45 game_name: 109 game_name:
46 type: string 110 type: string
47 id: 111 id:
48 type: integer 112 type: integer
113 image:
114 type: string
115 is_coop:
116 type: boolean
49 map_name: 117 map_name:
50 type: string 118 type: string
51 type: object 119 type: object
52 models.MapCategoryScores:
53 properties:
54 any:
55 type: integer
56 cm:
57 type: integer
58 inbounds_sla:
59 type: integer
60 no_sla:
61 type: integer
62 type: object
63 models.MapHistory: 120 models.MapHistory:
64 properties: 121 properties:
65 date: 122 date:
@@ -73,6 +130,21 @@ definitions:
73 properties: 130 properties:
74 records: {} 131 records: {}
75 type: object 132 type: object
133 models.MapRoute:
134 properties:
135 category:
136 $ref: '#/definitions/models.Category'
137 description:
138 type: string
139 history:
140 $ref: '#/definitions/models.MapHistory'
141 rating:
142 type: number
143 route_id:
144 type: integer
145 showcase:
146 type: string
147 type: object
76 models.MapShort: 148 models.MapShort:
77 properties: 149 properties:
78 id: 150 id:
@@ -82,22 +154,17 @@ definitions:
82 type: object 154 type: object
83 models.MapSummary: 155 models.MapSummary:
84 properties: 156 properties:
85 category_scores: 157 routes:
86 $ref: '#/definitions/models.MapCategoryScores'
87 description:
88 type: string
89 history:
90 items:
91 $ref: '#/definitions/models.MapHistory'
92 type: array
93 rating:
94 type: number
95 routers:
96 items: 158 items:
97 type: string 159 $ref: '#/definitions/models.MapRoute'
98 type: array 160 type: array
99 showcase: 161 type: object
100 type: string 162 models.MapSummaryResponse:
163 properties:
164 map:
165 $ref: '#/definitions/models.Map'
166 summary:
167 $ref: '#/definitions/models.MapSummary'
101 type: object 168 type: object
102 models.ProfileResponse: 169 models.ProfileResponse:
103 properties: 170 properties:
@@ -131,21 +198,12 @@ definitions:
131 $ref: '#/definitions/models.UserRanking' 198 $ref: '#/definitions/models.UserRanking'
132 type: array 199 type: array
133 type: object 200 type: object
134 models.RecordRequest: 201 models.RecordResponse:
135 properties: 202 properties:
136 is_partner_orange:
137 type: boolean
138 partner_id:
139 type: string
140 score_count: 203 score_count:
141 type: integer 204 type: integer
142 score_time: 205 score_time:
143 type: integer 206 type: integer
144 required:
145 - is_partner_orange
146 - partner_id
147 - score_count
148 - score_time
149 type: object 207 type: object
150 models.Response: 208 models.Response:
151 properties: 209 properties:
@@ -165,21 +223,11 @@ definitions:
165 properties: 223 properties:
166 maps: 224 maps:
167 items: 225 items:
168 properties: 226 $ref: '#/definitions/models.MapShort'
169 id:
170 type: integer
171 name:
172 type: string
173 type: object
174 type: array 227 type: array
175 players: 228 players:
176 items: 229 items:
177 properties: 230 $ref: '#/definitions/models.UserShort'
178 steam_id:
179 type: string
180 user_name:
181 type: string
182 type: object
183 type: array 231 type: array
184 type: object 232 type: object
185 models.UserRanking: 233 models.UserRanking:
@@ -191,6 +239,13 @@ definitions:
191 user_name: 239 user_name:
192 type: string 240 type: string
193 type: object 241 type: object
242 models.UserShort:
243 properties:
244 steam_id:
245 type: string
246 user_name:
247 type: string
248 type: object
194host: lp.ardapektezol.com/api 249host: lp.ardapektezol.com/api
195info: 250info:
196 contact: {} 251 contact: {}
@@ -203,6 +258,7 @@ info:
203paths: 258paths:
204 /chapters/{id}: 259 /chapters/{id}:
205 get: 260 get:
261 description: Get maps from the specified chapter id.
206 parameters: 262 parameters:
207 - description: Chapter ID 263 - description: Chapter ID
208 in: path 264 in: path
@@ -225,40 +281,19 @@ paths:
225 description: Bad Request 281 description: Bad Request
226 schema: 282 schema:
227 $ref: '#/definitions/models.Response' 283 $ref: '#/definitions/models.Response'
228 summary: Get maps from the specified chapter id.
229 tags: 284 tags:
230 - games & chapters 285 - games & chapters
231 /demo:
232 get:
233 produces:
234 - application/json
235 responses:
236 "200":
237 description: OK
238 schema:
239 allOf:
240 - $ref: '#/definitions/models.Response'
241 - properties:
242 data:
243 $ref: '#/definitions/models.RankingsResponse'
244 type: object
245 "400":
246 description: Bad Request
247 schema:
248 $ref: '#/definitions/models.Response'
249 summary: Get rankings of every player.
250 tags:
251 - rankings
252 /demos: 286 /demos:
253 get: 287 get:
254 consumes: 288 consumes:
255 - application/json 289 - application/json
290 description: Get demo with specified demo uuid.
256 parameters: 291 parameters:
257 - description: Demo UUID 292 - description: Demo UUID
258 in: query 293 in: query
259 name: uuid 294 name: uuid
260 required: true 295 required: true
261 type: integer 296 type: string
262 produces: 297 produces:
263 - application/octet-stream 298 - application/octet-stream
264 responses: 299 responses:
@@ -270,11 +305,11 @@ paths:
270 description: Bad Request 305 description: Bad Request
271 schema: 306 schema:
272 $ref: '#/definitions/models.Response' 307 $ref: '#/definitions/models.Response'
273 summary: Get demo with specified demo uuid.
274 tags: 308 tags:
275 - demo 309 - demo
276 /games: 310 /games:
277 get: 311 get:
312 description: Get games from the leaderboards.
278 produces: 313 produces:
279 - application/json 314 - application/json
280 responses: 315 responses:
@@ -293,11 +328,11 @@ paths:
293 description: Bad Request 328 description: Bad Request
294 schema: 329 schema:
295 $ref: '#/definitions/models.Response' 330 $ref: '#/definitions/models.Response'
296 summary: Get games from the leaderboards.
297 tags: 331 tags:
298 - games & chapters 332 - games & chapters
299 /games/{id}: 333 /games/{id}:
300 get: 334 get:
335 description: Get chapters from the specified game id.
301 parameters: 336 parameters:
302 - description: Game ID 337 - description: Game ID
303 in: path 338 in: path
@@ -320,13 +355,13 @@ paths:
320 description: Bad Request 355 description: Bad Request
321 schema: 356 schema:
322 $ref: '#/definitions/models.Response' 357 $ref: '#/definitions/models.Response'
323 summary: Get chapters from the specified game id.
324 tags: 358 tags:
325 - games & chapters 359 - games & chapters
326 /login: 360 /login:
327 get: 361 get:
328 consumes: 362 consumes:
329 - application/json 363 - application/json
364 description: Get (redirect) login page for Steam auth.
330 produces: 365 produces:
331 - application/json 366 - application/json
332 responses: 367 responses:
@@ -343,11 +378,49 @@ paths:
343 description: Bad Request 378 description: Bad Request
344 schema: 379 schema:
345 $ref: '#/definitions/models.Response' 380 $ref: '#/definitions/models.Response'
346 summary: Get (redirect) login page for Steam auth.
347 tags: 381 tags:
348 - login 382 - login
383 /maps/{id}/image:
384 put:
385 description: Edit map image with specified map id.
386 parameters:
387 - description: JWT Token
388 in: header
389 name: Authorization
390 required: true
391 type: string
392 - description: Map ID
393 in: path
394 name: id
395 required: true
396 type: integer
397 - description: Body
398 in: body
399 name: request
400 required: true
401 schema:
402 $ref: '#/definitions/models.EditMapImageRequest'
403 produces:
404 - application/json
405 responses:
406 "200":
407 description: OK
408 schema:
409 allOf:
410 - $ref: '#/definitions/models.Response'
411 - properties:
412 data:
413 $ref: '#/definitions/models.EditMapImageRequest'
414 type: object
415 "400":
416 description: Bad Request
417 schema:
418 $ref: '#/definitions/models.Response'
419 tags:
420 - maps
349 /maps/{id}/leaderboards: 421 /maps/{id}/leaderboards:
350 get: 422 get:
423 description: Get map leaderboards with specified id.
351 parameters: 424 parameters:
352 - description: Map ID 425 - description: Map ID
353 in: path 426 in: path
@@ -375,45 +448,40 @@ paths:
375 description: Bad Request 448 description: Bad Request
376 schema: 449 schema:
377 $ref: '#/definitions/models.Response' 450 $ref: '#/definitions/models.Response'
378 summary: Get map leaderboards with specified id.
379 tags: 451 tags:
380 - maps 452 - maps
381 /maps/{id}/record: 453 /maps/{id}/record:
382 post: 454 post:
383 consumes: 455 consumes:
384 - multipart/form-data 456 - multipart/form-data
457 description: Post record with demo of a specific map.
385 parameters: 458 parameters:
459 - description: Map ID
460 in: path
461 name: id
462 required: true
463 type: integer
386 - description: JWT Token 464 - description: JWT Token
387 in: header 465 in: header
388 name: Authorization 466 name: Authorization
389 required: true 467 required: true
390 type: string 468 type: string
391 - description: Demos 469 - description: Host Demo
392 in: formData 470 in: formData
393 items: 471 name: host_demo
394 type: file
395 name: demos
396 required: true 472 required: true
397 type: array 473 type: file
398 - description: Score Count 474 - description: Partner Demo
399 in: formData 475 in: formData
400 name: score_count 476 name: partner_demo
401 required: true 477 type: file
402 type: integer
403 - description: Score Time
404 in: formData
405 name: score_time
406 required: true
407 type: integer
408 - description: Is Partner Orange 478 - description: Is Partner Orange
409 in: formData 479 in: formData
410 name: is_partner_orange 480 name: is_partner_orange
411 required: true
412 type: boolean 481 type: boolean
413 - description: Partner ID 482 - description: Partner ID
414 in: formData 483 in: formData
415 name: partner_id 484 name: partner_id
416 required: true
417 type: string 485 type: string
418 produces: 486 produces:
419 - application/json 487 - application/json
@@ -425,7 +493,7 @@ paths:
425 - $ref: '#/definitions/models.Response' 493 - $ref: '#/definitions/models.Response'
426 - properties: 494 - properties:
427 data: 495 data:
428 $ref: '#/definitions/models.RecordRequest' 496 $ref: '#/definitions/models.RecordResponse'
429 type: object 497 type: object
430 "400": 498 "400":
431 description: Bad Request 499 description: Bad Request
@@ -435,11 +503,48 @@ paths:
435 description: Unauthorized 503 description: Unauthorized
436 schema: 504 schema:
437 $ref: '#/definitions/models.Response' 505 $ref: '#/definitions/models.Response'
438 summary: Post record with demo of a specific map.
439 tags: 506 tags:
440 - maps 507 - maps
441 /maps/{id}/summary: 508 /maps/{id}/summary:
509 delete:
510 description: Delete map summary with specified map id.
511 parameters:
512 - description: JWT Token
513 in: header
514 name: Authorization
515 required: true
516 type: string
517 - description: Map ID
518 in: path
519 name: id
520 required: true
521 type: integer
522 - description: Body
523 in: body
524 name: request
525 required: true
526 schema:
527 $ref: '#/definitions/models.DeleteMapSummaryRequest'
528 produces:
529 - application/json
530 responses:
531 "200":
532 description: OK
533 schema:
534 allOf:
535 - $ref: '#/definitions/models.Response'
536 - properties:
537 data:
538 $ref: '#/definitions/models.DeleteMapSummaryRequest'
539 type: object
540 "400":
541 description: Bad Request
542 schema:
543 $ref: '#/definitions/models.Response'
544 tags:
545 - maps
442 get: 546 get:
547 description: Get map summary with specified id.
443 parameters: 548 parameters:
444 - description: Map ID 549 - description: Map ID
445 in: path 550 in: path
@@ -456,24 +561,93 @@ paths:
456 - $ref: '#/definitions/models.Response' 561 - $ref: '#/definitions/models.Response'
457 - properties: 562 - properties:
458 data: 563 data:
459 allOf: 564 $ref: '#/definitions/models.MapSummaryResponse'
460 - $ref: '#/definitions/models.Map' 565 type: object
461 - properties: 566 "400":
462 data: 567 description: Bad Request
463 $ref: '#/definitions/models.MapSummary' 568 schema:
464 type: object 569 $ref: '#/definitions/models.Response'
570 tags:
571 - maps
572 post:
573 description: Create map summary with specified map id.
574 parameters:
575 - description: JWT Token
576 in: header
577 name: Authorization
578 required: true
579 type: string
580 - description: Map ID
581 in: path
582 name: id
583 required: true
584 type: integer
585 - description: Body
586 in: body
587 name: request
588 required: true
589 schema:
590 $ref: '#/definitions/models.CreateMapSummaryRequest'
591 produces:
592 - application/json
593 responses:
594 "200":
595 description: OK
596 schema:
597 allOf:
598 - $ref: '#/definitions/models.Response'
599 - properties:
600 data:
601 $ref: '#/definitions/models.CreateMapSummaryRequest'
602 type: object
603 "400":
604 description: Bad Request
605 schema:
606 $ref: '#/definitions/models.Response'
607 tags:
608 - maps
609 put:
610 description: Edit map summary with specified map id.
611 parameters:
612 - description: JWT Token
613 in: header
614 name: Authorization
615 required: true
616 type: string
617 - description: Map ID
618 in: path
619 name: id
620 required: true
621 type: integer
622 - description: Body
623 in: body
624 name: request
625 required: true
626 schema:
627 $ref: '#/definitions/models.EditMapSummaryRequest'
628 produces:
629 - application/json
630 responses:
631 "200":
632 description: OK
633 schema:
634 allOf:
635 - $ref: '#/definitions/models.Response'
636 - properties:
637 data:
638 $ref: '#/definitions/models.EditMapSummaryRequest'
465 type: object 639 type: object
466 "400": 640 "400":
467 description: Bad Request 641 description: Bad Request
468 schema: 642 schema:
469 $ref: '#/definitions/models.Response' 643 $ref: '#/definitions/models.Response'
470 summary: Get map summary with specified id.
471 tags: 644 tags:
472 - maps 645 - maps
473 /profile: 646 /profile:
474 get: 647 get:
475 consumes: 648 consumes:
476 - application/json 649 - application/json
650 description: Get profile page of session user.
477 parameters: 651 parameters:
478 - description: JWT Token 652 - description: JWT Token
479 in: header 653 in: header
@@ -500,12 +674,12 @@ paths:
500 description: Unauthorized 674 description: Unauthorized
501 schema: 675 schema:
502 $ref: '#/definitions/models.Response' 676 $ref: '#/definitions/models.Response'
503 summary: Get profile page of session user.
504 tags: 677 tags:
505 - users 678 - users
506 post: 679 post:
507 consumes: 680 consumes:
508 - application/json 681 - application/json
682 description: Update profile page of session user.
509 parameters: 683 parameters:
510 - description: JWT Token 684 - description: JWT Token
511 in: header 685 in: header
@@ -532,12 +706,12 @@ paths:
532 description: Unauthorized 706 description: Unauthorized
533 schema: 707 schema:
534 $ref: '#/definitions/models.Response' 708 $ref: '#/definitions/models.Response'
535 summary: Update profile page of session user.
536 tags: 709 tags:
537 - users 710 - users
538 put: 711 put:
539 consumes: 712 consumes:
540 - application/json 713 - application/json
714 description: Update country code of session user.
541 parameters: 715 parameters:
542 - description: JWT Token 716 - description: JWT Token
543 in: header 717 in: header
@@ -555,12 +729,7 @@ paths:
555 "200": 729 "200":
556 description: OK 730 description: OK
557 schema: 731 schema:
558 allOf: 732 $ref: '#/definitions/models.Response'
559 - $ref: '#/definitions/models.Response'
560 - properties:
561 data:
562 $ref: '#/definitions/models.ProfileResponse'
563 type: object
564 "400": 733 "400":
565 description: Bad Request 734 description: Bad Request
566 schema: 735 schema:
@@ -569,11 +738,37 @@ paths:
569 description: Unauthorized 738 description: Unauthorized
570 schema: 739 schema:
571 $ref: '#/definitions/models.Response' 740 $ref: '#/definitions/models.Response'
572 summary: Update country code of session user.
573 tags: 741 tags:
574 - users 742 - users
743 /rankings:
744 get:
745 description: Get rankings of every player.
746 produces:
747 - application/json
748 responses:
749 "200":
750 description: OK
751 schema:
752 allOf:
753 - $ref: '#/definitions/models.Response'
754 - properties:
755 data:
756 $ref: '#/definitions/models.RankingsResponse'
757 type: object
758 "400":
759 description: Bad Request
760 schema:
761 $ref: '#/definitions/models.Response'
762 tags:
763 - rankings
575 /search: 764 /search:
576 get: 765 get:
766 description: Get all user and map data matching to the query.
767 parameters:
768 - description: Search user or map name.
769 in: query
770 name: q
771 type: string
577 produces: 772 produces:
578 - application/json 773 - application/json
579 responses: 774 responses:
@@ -590,11 +785,11 @@ paths:
590 description: Bad Request 785 description: Bad Request
591 schema: 786 schema:
592 $ref: '#/definitions/models.Response' 787 $ref: '#/definitions/models.Response'
593 summary: Get all user and map data.
594 tags: 788 tags:
595 - search 789 - search
596 /token: 790 /token:
597 delete: 791 delete:
792 description: Deletes the token cookie from the user.
598 produces: 793 produces:
599 - application/json 794 - application/json
600 responses: 795 responses:
@@ -611,10 +806,10 @@ paths:
611 description: Not Found 806 description: Not Found
612 schema: 807 schema:
613 $ref: '#/definitions/models.Response' 808 $ref: '#/definitions/models.Response'
614 summary: Deletes the token cookie from the user.
615 tags: 809 tags:
616 - auth 810 - auth
617 get: 811 get:
812 description: Gets the token cookie value from the user.
618 produces: 813 produces:
619 - application/json 814 - application/json
620 responses: 815 responses:
@@ -631,13 +826,13 @@ paths:
631 description: Not Found 826 description: Not Found
632 schema: 827 schema:
633 $ref: '#/definitions/models.Response' 828 $ref: '#/definitions/models.Response'
634 summary: Gets the token cookie value from the user.
635 tags: 829 tags:
636 - auth 830 - auth
637 /users/{id}: 831 /users/{id}:
638 get: 832 get:
639 consumes: 833 consumes:
640 - application/json 834 - application/json
835 description: Get profile page of another user.
641 parameters: 836 parameters:
642 - description: User ID 837 - description: User ID
643 in: path 838 in: path
@@ -664,7 +859,6 @@ paths:
664 description: Not Found 859 description: Not Found
665 schema: 860 schema:
666 $ref: '#/definitions/models.Response' 861 $ref: '#/definitions/models.Response'
667 summary: Get profile page of another user.
668 tags: 862 tags:
669 - users 863 - users
670swagger: "2.0" 864swagger: "2.0"