diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-09-10 22:13:24 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-09-10 22:13:24 +0300 |
| commit | 16165aea34a711027825b3f6512e73a0156f8068 (patch) | |
| tree | 138d92b8b01c41e07a3a2316fd109ddd97e80fa6 /backend | |
| parent | refactor: update readme (diff) | |
| download | lphub-16165aea34a711027825b3f6512e73a0156f8068.tar.gz lphub-16165aea34a711027825b3f6512e73a0156f8068.tar.bz2 lphub-16165aea34a711027825b3f6512e73a0156f8068.zip | |
refactor: move backend entry, rename module
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/.env.example | 12 | ||||
| -rw-r--r-- | backend/api/auth.go | 5 | ||||
| -rw-r--r-- | backend/api/routes.go | 3 | ||||
| -rw-r--r-- | backend/docs/docs.go | 2160 | ||||
| -rw-r--r-- | backend/docs/swagger.json | 2136 | ||||
| -rw-r--r-- | backend/docs/swagger.yaml | 1324 | ||||
| -rw-r--r-- | backend/go.mod | 79 | ||||
| -rw-r--r-- | backend/go.sum | 270 | ||||
| -rw-r--r-- | backend/handlers/discussions.go | 5 | ||||
| -rw-r--r-- | backend/handlers/home.go | 5 | ||||
| -rw-r--r-- | backend/handlers/login.go | 5 | ||||
| -rw-r--r-- | backend/handlers/logs.go | 5 | ||||
| -rw-r--r-- | backend/handlers/map.go | 5 | ||||
| -rw-r--r-- | backend/handlers/mod.go | 5 | ||||
| -rw-r--r-- | backend/handlers/record.go | 7 | ||||
| -rw-r--r-- | backend/handlers/user.go | 5 | ||||
| -rw-r--r-- | backend/main.go | 37 |
17 files changed, 6048 insertions, 20 deletions
diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..774f2a2 --- /dev/null +++ b/backend/.env.example | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | PORT= | ||
| 2 | SECRET_KEY= | ||
| 3 | API_KEY= | ||
| 4 | ENV= | ||
| 5 | DB_HOST= | ||
| 6 | DB_PORT= | ||
| 7 | DB_USER= | ||
| 8 | DB_PASS= | ||
| 9 | DB_NAME= | ||
| 10 | GOOGLE_CLIENT_EMAIL= | ||
| 11 | GOOGLE_PRIVATE_KEY_BASE64= | ||
| 12 | GOOGLE_FOLDER_ID= \ No newline at end of file | ||
diff --git a/backend/api/auth.go b/backend/api/auth.go index 91ef80c..621a68b 100644 --- a/backend/api/auth.go +++ b/backend/api/auth.go | |||
| @@ -5,10 +5,11 @@ import ( | |||
| 5 | "os" | 5 | "os" |
| 6 | "time" | 6 | "time" |
| 7 | 7 | ||
| 8 | "lphub/database" | ||
| 9 | "lphub/models" | ||
| 10 | |||
| 8 | "github.com/gin-gonic/gin" | 11 | "github.com/gin-gonic/gin" |
| 9 | "github.com/golang-jwt/jwt/v4" | 12 | "github.com/golang-jwt/jwt/v4" |
| 10 | "github.com/pektezol/leastportalshub/backend/database" | ||
| 11 | "github.com/pektezol/leastportalshub/backend/models" | ||
| 12 | ) | 13 | ) |
| 13 | 14 | ||
| 14 | func CheckAuth(c *gin.Context) { | 15 | func CheckAuth(c *gin.Context) { |
diff --git a/backend/api/routes.go b/backend/api/routes.go index ed1ca90..050a3bd 100644 --- a/backend/api/routes.go +++ b/backend/api/routes.go | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | package api | 1 | package api |
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "lphub/handlers" | ||
| 5 | |||
| 4 | "github.com/gin-gonic/gin" | 6 | "github.com/gin-gonic/gin" |
| 5 | "github.com/pektezol/leastportalshub/backend/handlers" | ||
| 6 | swaggerfiles "github.com/swaggo/files" | 7 | swaggerfiles "github.com/swaggo/files" |
| 7 | ginSwagger "github.com/swaggo/gin-swagger" | 8 | ginSwagger "github.com/swaggo/gin-swagger" |
| 8 | ) | 9 | ) |
diff --git a/backend/docs/docs.go b/backend/docs/docs.go new file mode 100644 index 0000000..f652a1e --- /dev/null +++ b/backend/docs/docs.go | |||
| @@ -0,0 +1,2160 @@ | |||
| 1 | // Package docs Code generated by swaggo/swag. DO NOT EDIT | ||
| 2 | package docs | ||
| 3 | |||
| 4 | import "github.com/swaggo/swag" | ||
| 5 | |||
| 6 | const docTemplate = `{ | ||
| 7 | "schemes": {{ marshal .Schemes }}, | ||
| 8 | "swagger": "2.0", | ||
| 9 | "info": { | ||
| 10 | "description": "{{escape .Description}}", | ||
| 11 | "title": "{{.Title}}", | ||
| 12 | "contact": {}, | ||
| 13 | "license": { | ||
| 14 | "name": "GNU Affero General Public License, Version 3", | ||
| 15 | "url": "https://www.gnu.org/licenses/agpl-3.0.html" | ||
| 16 | }, | ||
| 17 | "version": "{{.Version}}" | ||
| 18 | }, | ||
| 19 | "host": "{{.Host}}", | ||
| 20 | "basePath": "{{.BasePath}}", | ||
| 21 | "paths": { | ||
| 22 | "/chapters/{chapterid}": { | ||
| 23 | "get": { | ||
| 24 | "description": "Get maps from the specified chapter id.", | ||
| 25 | "produces": [ | ||
| 26 | "application/json" | ||
| 27 | ], | ||
| 28 | "tags": [ | ||
| 29 | "games \u0026 chapters" | ||
| 30 | ], | ||
| 31 | "parameters": [ | ||
| 32 | { | ||
| 33 | "type": "integer", | ||
| 34 | "description": "Chapter ID", | ||
| 35 | "name": "chapterid", | ||
| 36 | "in": "path", | ||
| 37 | "required": true | ||
| 38 | } | ||
| 39 | ], | ||
| 40 | "responses": { | ||
| 41 | "200": { | ||
| 42 | "description": "OK", | ||
| 43 | "schema": { | ||
| 44 | "allOf": [ | ||
| 45 | { | ||
| 46 | "$ref": "#/definitions/models.Response" | ||
| 47 | }, | ||
| 48 | { | ||
| 49 | "type": "object", | ||
| 50 | "properties": { | ||
| 51 | "data": { | ||
| 52 | "$ref": "#/definitions/handlers.ChapterMapsResponse" | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } | ||
| 56 | ] | ||
| 57 | } | ||
| 58 | }, | ||
| 59 | "400": { | ||
| 60 | "description": "Bad Request", | ||
| 61 | "schema": { | ||
| 62 | "$ref": "#/definitions/models.Response" | ||
| 63 | } | ||
| 64 | } | ||
| 65 | } | ||
| 66 | } | ||
| 67 | }, | ||
| 68 | "/demos": { | ||
| 69 | "get": { | ||
| 70 | "description": "Get demo with specified demo uuid.", | ||
| 71 | "consumes": [ | ||
| 72 | "application/json" | ||
| 73 | ], | ||
| 74 | "produces": [ | ||
| 75 | "application/octet-stream" | ||
| 76 | ], | ||
| 77 | "tags": [ | ||
| 78 | "demo" | ||
| 79 | ], | ||
| 80 | "parameters": [ | ||
| 81 | { | ||
| 82 | "type": "string", | ||
| 83 | "description": "Demo UUID", | ||
| 84 | "name": "uuid", | ||
| 85 | "in": "query", | ||
| 86 | "required": true | ||
| 87 | } | ||
| 88 | ], | ||
| 89 | "responses": { | ||
| 90 | "200": { | ||
| 91 | "description": "Demo File", | ||
| 92 | "schema": { | ||
| 93 | "type": "file" | ||
| 94 | } | ||
| 95 | } | ||
| 96 | } | ||
| 97 | } | ||
| 98 | }, | ||
| 99 | "/games": { | ||
| 100 | "get": { | ||
| 101 | "description": "Get games from the leaderboards.", | ||
| 102 | "produces": [ | ||
| 103 | "application/json" | ||
| 104 | ], | ||
| 105 | "tags": [ | ||
| 106 | "games \u0026 chapters" | ||
| 107 | ], | ||
| 108 | "responses": { | ||
| 109 | "200": { | ||
| 110 | "description": "OK", | ||
| 111 | "schema": { | ||
| 112 | "allOf": [ | ||
| 113 | { | ||
| 114 | "$ref": "#/definitions/models.Response" | ||
| 115 | }, | ||
| 116 | { | ||
| 117 | "type": "object", | ||
| 118 | "properties": { | ||
| 119 | "data": { | ||
| 120 | "type": "array", | ||
| 121 | "items": { | ||
| 122 | "$ref": "#/definitions/models.Game" | ||
| 123 | } | ||
| 124 | } | ||
| 125 | } | ||
| 126 | } | ||
| 127 | ] | ||
| 128 | } | ||
| 129 | }, | ||
| 130 | "400": { | ||
| 131 | "description": "Bad Request", | ||
| 132 | "schema": { | ||
| 133 | "$ref": "#/definitions/models.Response" | ||
| 134 | } | ||
| 135 | } | ||
| 136 | } | ||
| 137 | } | ||
| 138 | }, | ||
| 139 | "/games/{gameid}": { | ||
| 140 | "get": { | ||
| 141 | "description": "Get chapters from the specified game id.", | ||
| 142 | "produces": [ | ||
| 143 | "application/json" | ||
| 144 | ], | ||
| 145 | "tags": [ | ||
| 146 | "games \u0026 chapters" | ||
| 147 | ], | ||
| 148 | "parameters": [ | ||
| 149 | { | ||
| 150 | "type": "integer", | ||
| 151 | "description": "Game ID", | ||
| 152 | "name": "gameid", | ||
| 153 | "in": "path", | ||
| 154 | "required": true | ||
| 155 | } | ||
| 156 | ], | ||
| 157 | "responses": { | ||
| 158 | "200": { | ||
| 159 | "description": "OK", | ||
| 160 | "schema": { | ||
| 161 | "allOf": [ | ||
| 162 | { | ||
| 163 | "$ref": "#/definitions/models.Response" | ||
| 164 | }, | ||
| 165 | { | ||
| 166 | "type": "object", | ||
| 167 | "properties": { | ||
| 168 | "data": { | ||
| 169 | "$ref": "#/definitions/handlers.ChaptersResponse" | ||
| 170 | } | ||
| 171 | } | ||
| 172 | } | ||
| 173 | ] | ||
| 174 | } | ||
| 175 | } | ||
| 176 | } | ||
| 177 | } | ||
| 178 | }, | ||
| 179 | "/games/{gameid}/maps": { | ||
| 180 | "get": { | ||
| 181 | "description": "Get maps from the specified game id.", | ||
| 182 | "produces": [ | ||
| 183 | "application/json" | ||
| 184 | ], | ||
| 185 | "tags": [ | ||
| 186 | "games \u0026 chapters" | ||
| 187 | ], | ||
| 188 | "parameters": [ | ||
| 189 | { | ||
| 190 | "type": "integer", | ||
| 191 | "description": "Game ID", | ||
| 192 | "name": "gameid", | ||
| 193 | "in": "path", | ||
| 194 | "required": true | ||
| 195 | } | ||
| 196 | ], | ||
| 197 | "responses": { | ||
| 198 | "200": { | ||
| 199 | "description": "OK", | ||
| 200 | "schema": { | ||
| 201 | "allOf": [ | ||
| 202 | { | ||
| 203 | "$ref": "#/definitions/models.Response" | ||
| 204 | }, | ||
| 205 | { | ||
| 206 | "type": "object", | ||
| 207 | "properties": { | ||
| 208 | "data": { | ||
| 209 | "$ref": "#/definitions/handlers.ChaptersResponse" | ||
| 210 | } | ||
| 211 | } | ||
| 212 | } | ||
| 213 | ] | ||
| 214 | } | ||
| 215 | } | ||
| 216 | } | ||
| 217 | } | ||
| 218 | }, | ||
| 219 | "/login": { | ||
| 220 | "get": { | ||
| 221 | "description": "Get (redirect) login page for Steam auth.", | ||
| 222 | "consumes": [ | ||
| 223 | "application/json" | ||
| 224 | ], | ||
| 225 | "produces": [ | ||
| 226 | "application/json" | ||
| 227 | ], | ||
| 228 | "tags": [ | ||
| 229 | "login" | ||
| 230 | ], | ||
| 231 | "responses": { | ||
| 232 | "200": { | ||
| 233 | "description": "OK", | ||
| 234 | "schema": { | ||
| 235 | "allOf": [ | ||
| 236 | { | ||
| 237 | "$ref": "#/definitions/models.Response" | ||
| 238 | }, | ||
| 239 | { | ||
| 240 | "type": "object", | ||
| 241 | "properties": { | ||
| 242 | "data": { | ||
| 243 | "$ref": "#/definitions/handlers.LoginResponse" | ||
| 244 | } | ||
| 245 | } | ||
| 246 | } | ||
| 247 | ] | ||
| 248 | } | ||
| 249 | } | ||
| 250 | } | ||
| 251 | } | ||
| 252 | }, | ||
| 253 | "/logs/mod": { | ||
| 254 | "get": { | ||
| 255 | "description": "Get mod logs.", | ||
| 256 | "produces": [ | ||
| 257 | "application/json" | ||
| 258 | ], | ||
| 259 | "tags": [ | ||
| 260 | "logs" | ||
| 261 | ], | ||
| 262 | "parameters": [ | ||
| 263 | { | ||
| 264 | "type": "string", | ||
| 265 | "description": "JWT Token", | ||
| 266 | "name": "Authorization", | ||
| 267 | "in": "header", | ||
| 268 | "required": true | ||
| 269 | } | ||
| 270 | ], | ||
| 271 | "responses": { | ||
| 272 | "200": { | ||
| 273 | "description": "OK", | ||
| 274 | "schema": { | ||
| 275 | "allOf": [ | ||
| 276 | { | ||
| 277 | "$ref": "#/definitions/models.Response" | ||
| 278 | }, | ||
| 279 | { | ||
| 280 | "type": "object", | ||
| 281 | "properties": { | ||
| 282 | "data": { | ||
| 283 | "$ref": "#/definitions/handlers.LogsResponse" | ||
| 284 | } | ||
| 285 | } | ||
| 286 | } | ||
| 287 | ] | ||
| 288 | } | ||
| 289 | } | ||
| 290 | } | ||
| 291 | } | ||
| 292 | }, | ||
| 293 | "/logs/score": { | ||
| 294 | "get": { | ||
| 295 | "description": "Get score logs of every player.", | ||
| 296 | "produces": [ | ||
| 297 | "application/json" | ||
| 298 | ], | ||
| 299 | "tags": [ | ||
| 300 | "logs" | ||
| 301 | ], | ||
| 302 | "responses": { | ||
| 303 | "200": { | ||
| 304 | "description": "OK", | ||
| 305 | "schema": { | ||
| 306 | "allOf": [ | ||
| 307 | { | ||
| 308 | "$ref": "#/definitions/models.Response" | ||
| 309 | }, | ||
| 310 | { | ||
| 311 | "type": "object", | ||
| 312 | "properties": { | ||
| 313 | "data": { | ||
| 314 | "$ref": "#/definitions/handlers.ScoreLogsResponse" | ||
| 315 | } | ||
| 316 | } | ||
| 317 | } | ||
| 318 | ] | ||
| 319 | } | ||
| 320 | } | ||
| 321 | } | ||
| 322 | } | ||
| 323 | }, | ||
| 324 | "/maps/{mapid}/discussions": { | ||
| 325 | "get": { | ||
| 326 | "description": "Get map discussions with specified map id.", | ||
| 327 | "produces": [ | ||
| 328 | "application/json" | ||
| 329 | ], | ||
| 330 | "tags": [ | ||
| 331 | "maps / discussions" | ||
| 332 | ], | ||
| 333 | "parameters": [ | ||
| 334 | { | ||
| 335 | "type": "integer", | ||
| 336 | "description": "Map ID", | ||
| 337 | "name": "mapid", | ||
| 338 | "in": "path", | ||
| 339 | "required": true | ||
| 340 | } | ||
| 341 | ], | ||
| 342 | "responses": { | ||
| 343 | "200": { | ||
| 344 | "description": "OK", | ||
| 345 | "schema": { | ||
| 346 | "allOf": [ | ||
| 347 | { | ||
| 348 | "$ref": "#/definitions/models.Response" | ||
| 349 | }, | ||
| 350 | { | ||
| 351 | "type": "object", | ||
| 352 | "properties": { | ||
| 353 | "data": { | ||
| 354 | "$ref": "#/definitions/handlers.MapDiscussionsResponse" | ||
| 355 | } | ||
| 356 | } | ||
| 357 | } | ||
| 358 | ] | ||
| 359 | } | ||
| 360 | } | ||
| 361 | } | ||
| 362 | }, | ||
| 363 | "post": { | ||
| 364 | "description": "Create map discussion with specified map id.", | ||
| 365 | "produces": [ | ||
| 366 | "application/json" | ||
| 367 | ], | ||
| 368 | "tags": [ | ||
| 369 | "maps / discussions" | ||
| 370 | ], | ||
| 371 | "parameters": [ | ||
| 372 | { | ||
| 373 | "type": "string", | ||
| 374 | "description": "JWT Token", | ||
| 375 | "name": "Authorization", | ||
| 376 | "in": "header", | ||
| 377 | "required": true | ||
| 378 | }, | ||
| 379 | { | ||
| 380 | "type": "integer", | ||
| 381 | "description": "Map ID", | ||
| 382 | "name": "mapid", | ||
| 383 | "in": "path", | ||
| 384 | "required": true | ||
| 385 | }, | ||
| 386 | { | ||
| 387 | "description": "Body", | ||
| 388 | "name": "request", | ||
| 389 | "in": "body", | ||
| 390 | "required": true, | ||
| 391 | "schema": { | ||
| 392 | "$ref": "#/definitions/handlers.CreateMapDiscussionRequest" | ||
| 393 | } | ||
| 394 | } | ||
| 395 | ], | ||
| 396 | "responses": { | ||
| 397 | "200": { | ||
| 398 | "description": "OK", | ||
| 399 | "schema": { | ||
| 400 | "allOf": [ | ||
| 401 | { | ||
| 402 | "$ref": "#/definitions/models.Response" | ||
| 403 | }, | ||
| 404 | { | ||
| 405 | "type": "object", | ||
| 406 | "properties": { | ||
| 407 | "data": { | ||
| 408 | "$ref": "#/definitions/handlers.CreateMapDiscussionRequest" | ||
| 409 | } | ||
| 410 | } | ||
| 411 | } | ||
| 412 | ] | ||
| 413 | } | ||
| 414 | } | ||
| 415 | } | ||
| 416 | } | ||
| 417 | }, | ||
| 418 | "/maps/{mapid}/discussions/{discussionid}": { | ||
| 419 | "get": { | ||
| 420 | "description": "Get map discussion with specified map and discussion id.", | ||
| 421 | "produces": [ | ||
| 422 | "application/json" | ||
| 423 | ], | ||
| 424 | "tags": [ | ||
| 425 | "maps / discussions" | ||
| 426 | ], | ||
| 427 | "parameters": [ | ||
| 428 | { | ||
| 429 | "type": "integer", | ||
| 430 | "description": "Map ID", | ||
| 431 | "name": "mapid", | ||
| 432 | "in": "path", | ||
| 433 | "required": true | ||
| 434 | }, | ||
| 435 | { | ||
| 436 | "type": "integer", | ||
| 437 | "description": "Discussion ID", | ||
| 438 | "name": "discussionid", | ||
| 439 | "in": "path", | ||
| 440 | "required": true | ||
| 441 | } | ||
| 442 | ], | ||
| 443 | "responses": { | ||
| 444 | "200": { | ||
| 445 | "description": "OK", | ||
| 446 | "schema": { | ||
| 447 | "allOf": [ | ||
| 448 | { | ||
| 449 | "$ref": "#/definitions/models.Response" | ||
| 450 | }, | ||
| 451 | { | ||
| 452 | "type": "object", | ||
| 453 | "properties": { | ||
| 454 | "data": { | ||
| 455 | "$ref": "#/definitions/handlers.MapDiscussionResponse" | ||
| 456 | } | ||
| 457 | } | ||
| 458 | } | ||
| 459 | ] | ||
| 460 | } | ||
| 461 | } | ||
| 462 | } | ||
| 463 | }, | ||
| 464 | "put": { | ||
| 465 | "description": "Edit map discussion with specified map id.", | ||
| 466 | "produces": [ | ||
| 467 | "application/json" | ||
| 468 | ], | ||
| 469 | "tags": [ | ||
| 470 | "maps / discussions" | ||
| 471 | ], | ||
| 472 | "parameters": [ | ||
| 473 | { | ||
| 474 | "type": "string", | ||
| 475 | "description": "JWT Token", | ||
| 476 | "name": "Authorization", | ||
| 477 | "in": "header", | ||
| 478 | "required": true | ||
| 479 | }, | ||
| 480 | { | ||
| 481 | "type": "integer", | ||
| 482 | "description": "Map ID", | ||
| 483 | "name": "mapid", | ||
| 484 | "in": "path", | ||
| 485 | "required": true | ||
| 486 | }, | ||
| 487 | { | ||
| 488 | "type": "integer", | ||
| 489 | "description": "Discussion ID", | ||
| 490 | "name": "discussionid", | ||
| 491 | "in": "path", | ||
| 492 | "required": true | ||
| 493 | }, | ||
| 494 | { | ||
| 495 | "description": "Body", | ||
| 496 | "name": "request", | ||
| 497 | "in": "body", | ||
| 498 | "required": true, | ||
| 499 | "schema": { | ||
| 500 | "$ref": "#/definitions/handlers.EditMapDiscussionRequest" | ||
| 501 | } | ||
| 502 | } | ||
| 503 | ], | ||
| 504 | "responses": { | ||
| 505 | "200": { | ||
| 506 | "description": "OK", | ||
| 507 | "schema": { | ||
| 508 | "allOf": [ | ||
| 509 | { | ||
| 510 | "$ref": "#/definitions/models.Response" | ||
| 511 | }, | ||
| 512 | { | ||
| 513 | "type": "object", | ||
| 514 | "properties": { | ||
| 515 | "data": { | ||
| 516 | "$ref": "#/definitions/handlers.EditMapDiscussionRequest" | ||
| 517 | } | ||
| 518 | } | ||
| 519 | } | ||
| 520 | ] | ||
| 521 | } | ||
| 522 | } | ||
| 523 | } | ||
| 524 | }, | ||
| 525 | "post": { | ||
| 526 | "description": "Create map discussion comment with specified map id.", | ||
| 527 | "produces": [ | ||
| 528 | "application/json" | ||
| 529 | ], | ||
| 530 | "tags": [ | ||
| 531 | "maps / discussions" | ||
| 532 | ], | ||
| 533 | "parameters": [ | ||
| 534 | { | ||
| 535 | "type": "string", | ||
| 536 | "description": "JWT Token", | ||
| 537 | "name": "Authorization", | ||
| 538 | "in": "header", | ||
| 539 | "required": true | ||
| 540 | }, | ||
| 541 | { | ||
| 542 | "type": "integer", | ||
| 543 | "description": "Map ID", | ||
| 544 | "name": "mapid", | ||
| 545 | "in": "path", | ||
| 546 | "required": true | ||
| 547 | }, | ||
| 548 | { | ||
| 549 | "type": "integer", | ||
| 550 | "description": "Discussion ID", | ||
| 551 | "name": "discussionid", | ||
| 552 | "in": "path", | ||
| 553 | "required": true | ||
| 554 | }, | ||
| 555 | { | ||
| 556 | "description": "Body", | ||
| 557 | "name": "request", | ||
| 558 | "in": "body", | ||
| 559 | "required": true, | ||
| 560 | "schema": { | ||
| 561 | "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" | ||
| 562 | } | ||
| 563 | } | ||
| 564 | ], | ||
| 565 | "responses": { | ||
| 566 | "200": { | ||
| 567 | "description": "OK", | ||
| 568 | "schema": { | ||
| 569 | "allOf": [ | ||
| 570 | { | ||
| 571 | "$ref": "#/definitions/models.Response" | ||
| 572 | }, | ||
| 573 | { | ||
| 574 | "type": "object", | ||
| 575 | "properties": { | ||
| 576 | "data": { | ||
| 577 | "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" | ||
| 578 | } | ||
| 579 | } | ||
| 580 | } | ||
| 581 | ] | ||
| 582 | } | ||
| 583 | } | ||
| 584 | } | ||
| 585 | }, | ||
| 586 | "delete": { | ||
| 587 | "description": "Delete map discussion with specified map id.", | ||
| 588 | "produces": [ | ||
| 589 | "application/json" | ||
| 590 | ], | ||
| 591 | "tags": [ | ||
| 592 | "maps / discussions" | ||
| 593 | ], | ||
| 594 | "parameters": [ | ||
| 595 | { | ||
| 596 | "type": "string", | ||
| 597 | "description": "JWT Token", | ||
| 598 | "name": "Authorization", | ||
| 599 | "in": "header", | ||
| 600 | "required": true | ||
| 601 | }, | ||
| 602 | { | ||
| 603 | "type": "integer", | ||
| 604 | "description": "Map ID", | ||
| 605 | "name": "mapid", | ||
| 606 | "in": "path", | ||
| 607 | "required": true | ||
| 608 | }, | ||
| 609 | { | ||
| 610 | "type": "integer", | ||
| 611 | "description": "Discussion ID", | ||
| 612 | "name": "discussionid", | ||
| 613 | "in": "path", | ||
| 614 | "required": true | ||
| 615 | } | ||
| 616 | ], | ||
| 617 | "responses": { | ||
| 618 | "200": { | ||
| 619 | "description": "OK", | ||
| 620 | "schema": { | ||
| 621 | "$ref": "#/definitions/models.Response" | ||
| 622 | } | ||
| 623 | } | ||
| 624 | } | ||
| 625 | } | ||
| 626 | }, | ||
| 627 | "/maps/{mapid}/image": { | ||
| 628 | "put": { | ||
| 629 | "description": "Edit map image with specified map id.", | ||
| 630 | "produces": [ | ||
| 631 | "application/json" | ||
| 632 | ], | ||
| 633 | "tags": [ | ||
| 634 | "maps / summary" | ||
| 635 | ], | ||
| 636 | "parameters": [ | ||
| 637 | { | ||
| 638 | "type": "string", | ||
| 639 | "description": "JWT Token", | ||
| 640 | "name": "Authorization", | ||
| 641 | "in": "header", | ||
| 642 | "required": true | ||
| 643 | }, | ||
| 644 | { | ||
| 645 | "type": "integer", | ||
| 646 | "description": "Map ID", | ||
| 647 | "name": "mapid", | ||
| 648 | "in": "path", | ||
| 649 | "required": true | ||
| 650 | }, | ||
| 651 | { | ||
| 652 | "description": "Body", | ||
| 653 | "name": "request", | ||
| 654 | "in": "body", | ||
| 655 | "required": true, | ||
| 656 | "schema": { | ||
| 657 | "$ref": "#/definitions/handlers.EditMapImageRequest" | ||
| 658 | } | ||
| 659 | } | ||
| 660 | ], | ||
| 661 | "responses": { | ||
| 662 | "200": { | ||
| 663 | "description": "OK", | ||
| 664 | "schema": { | ||
| 665 | "allOf": [ | ||
| 666 | { | ||
| 667 | "$ref": "#/definitions/models.Response" | ||
| 668 | }, | ||
| 669 | { | ||
| 670 | "type": "object", | ||
| 671 | "properties": { | ||
| 672 | "data": { | ||
| 673 | "$ref": "#/definitions/handlers.EditMapImageRequest" | ||
| 674 | } | ||
| 675 | } | ||
| 676 | } | ||
| 677 | ] | ||
| 678 | } | ||
| 679 | } | ||
| 680 | } | ||
| 681 | } | ||
| 682 | }, | ||
| 683 | "/maps/{mapid}/leaderboards": { | ||
| 684 | "get": { | ||
| 685 | "description": "Get map leaderboards with specified id.", | ||
| 686 | "produces": [ | ||
| 687 | "application/json" | ||
| 688 | ], | ||
| 689 | "tags": [ | ||
| 690 | "maps / leaderboards" | ||
| 691 | ], | ||
| 692 | "parameters": [ | ||
| 693 | { | ||
| 694 | "type": "integer", | ||
| 695 | "description": "Map ID", | ||
| 696 | "name": "mapid", | ||
| 697 | "in": "path", | ||
| 698 | "required": true | ||
| 699 | }, | ||
| 700 | { | ||
| 701 | "type": "integer", | ||
| 702 | "description": "Page Number (default: 1)", | ||
| 703 | "name": "page", | ||
| 704 | "in": "query" | ||
| 705 | }, | ||
| 706 | { | ||
| 707 | "type": "integer", | ||
| 708 | "description": "Number of Records Per Page (default: 20)", | ||
| 709 | "name": "pageSize", | ||
| 710 | "in": "query" | ||
| 711 | } | ||
| 712 | ], | ||
| 713 | "responses": { | ||
| 714 | "200": { | ||
| 715 | "description": "OK", | ||
| 716 | "schema": { | ||
| 717 | "allOf": [ | ||
| 718 | { | ||
| 719 | "$ref": "#/definitions/models.Response" | ||
| 720 | }, | ||
| 721 | { | ||
| 722 | "type": "object", | ||
| 723 | "properties": { | ||
| 724 | "data": { | ||
| 725 | "$ref": "#/definitions/handlers.MapLeaderboardsResponse" | ||
| 726 | } | ||
| 727 | } | ||
| 728 | } | ||
| 729 | ] | ||
| 730 | } | ||
| 731 | } | ||
| 732 | } | ||
| 733 | } | ||
| 734 | }, | ||
| 735 | "/maps/{mapid}/record": { | ||
| 736 | "post": { | ||
| 737 | "description": "Post record with demo of a specific map.", | ||
| 738 | "consumes": [ | ||
| 739 | "multipart/form-data" | ||
| 740 | ], | ||
| 741 | "produces": [ | ||
| 742 | "application/json" | ||
| 743 | ], | ||
| 744 | "tags": [ | ||
| 745 | "maps / leaderboards" | ||
| 746 | ], | ||
| 747 | "parameters": [ | ||
| 748 | { | ||
| 749 | "type": "integer", | ||
| 750 | "description": "Map ID", | ||
| 751 | "name": "mapid", | ||
| 752 | "in": "path", | ||
| 753 | "required": true | ||
| 754 | }, | ||
| 755 | { | ||
| 756 | "type": "string", | ||
| 757 | "description": "JWT Token", | ||
| 758 | "name": "Authorization", | ||
| 759 | "in": "header", | ||
| 760 | "required": true | ||
| 761 | }, | ||
| 762 | { | ||
| 763 | "type": "file", | ||
| 764 | "description": "Host Demo", | ||
| 765 | "name": "host_demo", | ||
| 766 | "in": "formData", | ||
| 767 | "required": true | ||
| 768 | }, | ||
| 769 | { | ||
| 770 | "type": "file", | ||
| 771 | "description": "Partner Demo", | ||
| 772 | "name": "partner_demo", | ||
| 773 | "in": "formData" | ||
| 774 | }, | ||
| 775 | { | ||
| 776 | "type": "boolean", | ||
| 777 | "description": "Is Partner Orange", | ||
| 778 | "name": "is_partner_orange", | ||
| 779 | "in": "formData" | ||
| 780 | }, | ||
| 781 | { | ||
| 782 | "type": "string", | ||
| 783 | "description": "Partner ID", | ||
| 784 | "name": "partner_id", | ||
| 785 | "in": "formData" | ||
| 786 | } | ||
| 787 | ], | ||
| 788 | "responses": { | ||
| 789 | "200": { | ||
| 790 | "description": "OK", | ||
| 791 | "schema": { | ||
| 792 | "allOf": [ | ||
| 793 | { | ||
| 794 | "$ref": "#/definitions/models.Response" | ||
| 795 | }, | ||
| 796 | { | ||
| 797 | "type": "object", | ||
| 798 | "properties": { | ||
| 799 | "data": { | ||
| 800 | "$ref": "#/definitions/handlers.RecordResponse" | ||
| 801 | } | ||
| 802 | } | ||
| 803 | } | ||
| 804 | ] | ||
| 805 | } | ||
| 806 | } | ||
| 807 | } | ||
| 808 | } | ||
| 809 | }, | ||
| 810 | "/maps/{mapid}/record/{recordid}": { | ||
| 811 | "delete": { | ||
| 812 | "description": "Delete record with specified map and record id.", | ||
| 813 | "produces": [ | ||
| 814 | "application/json" | ||
| 815 | ], | ||
| 816 | "tags": [ | ||
| 817 | "maps / leaderboards" | ||
| 818 | ], | ||
| 819 | "parameters": [ | ||
| 820 | { | ||
| 821 | "type": "integer", | ||
| 822 | "description": "Map ID", | ||
| 823 | "name": "mapid", | ||
| 824 | "in": "path", | ||
| 825 | "required": true | ||
| 826 | }, | ||
| 827 | { | ||
| 828 | "type": "integer", | ||
| 829 | "description": "Record ID", | ||
| 830 | "name": "recordid", | ||
| 831 | "in": "path", | ||
| 832 | "required": true | ||
| 833 | }, | ||
| 834 | { | ||
| 835 | "type": "string", | ||
| 836 | "description": "JWT Token", | ||
| 837 | "name": "Authorization", | ||
| 838 | "in": "header", | ||
| 839 | "required": true | ||
| 840 | } | ||
| 841 | ], | ||
| 842 | "responses": { | ||
| 843 | "200": { | ||
| 844 | "description": "OK", | ||
| 845 | "schema": { | ||
| 846 | "$ref": "#/definitions/models.Response" | ||
| 847 | } | ||
| 848 | } | ||
| 849 | } | ||
| 850 | } | ||
| 851 | }, | ||
| 852 | "/maps/{mapid}/summary": { | ||
| 853 | "get": { | ||
| 854 | "description": "Get map summary with specified id.", | ||
| 855 | "produces": [ | ||
| 856 | "application/json" | ||
| 857 | ], | ||
| 858 | "tags": [ | ||
| 859 | "maps / summary" | ||
| 860 | ], | ||
| 861 | "parameters": [ | ||
| 862 | { | ||
| 863 | "type": "integer", | ||
| 864 | "description": "Map ID", | ||
| 865 | "name": "mapid", | ||
| 866 | "in": "path", | ||
| 867 | "required": true | ||
| 868 | } | ||
| 869 | ], | ||
| 870 | "responses": { | ||
| 871 | "200": { | ||
| 872 | "description": "OK", | ||
| 873 | "schema": { | ||
| 874 | "allOf": [ | ||
| 875 | { | ||
| 876 | "$ref": "#/definitions/models.Response" | ||
| 877 | }, | ||
| 878 | { | ||
| 879 | "type": "object", | ||
| 880 | "properties": { | ||
| 881 | "data": { | ||
| 882 | "$ref": "#/definitions/handlers.MapSummaryResponse" | ||
| 883 | } | ||
| 884 | } | ||
| 885 | } | ||
| 886 | ] | ||
| 887 | } | ||
| 888 | } | ||
| 889 | } | ||
| 890 | }, | ||
| 891 | "put": { | ||
| 892 | "description": "Edit map summary with specified map id.", | ||
| 893 | "produces": [ | ||
| 894 | "application/json" | ||
| 895 | ], | ||
| 896 | "tags": [ | ||
| 897 | "maps / summary" | ||
| 898 | ], | ||
| 899 | "parameters": [ | ||
| 900 | { | ||
| 901 | "type": "string", | ||
| 902 | "description": "JWT Token", | ||
| 903 | "name": "Authorization", | ||
| 904 | "in": "header", | ||
| 905 | "required": true | ||
| 906 | }, | ||
| 907 | { | ||
| 908 | "type": "integer", | ||
| 909 | "description": "Map ID", | ||
| 910 | "name": "mapid", | ||
| 911 | "in": "path", | ||
| 912 | "required": true | ||
| 913 | }, | ||
| 914 | { | ||
| 915 | "description": "Body", | ||
| 916 | "name": "request", | ||
| 917 | "in": "body", | ||
| 918 | "required": true, | ||
| 919 | "schema": { | ||
| 920 | "$ref": "#/definitions/handlers.EditMapSummaryRequest" | ||
| 921 | } | ||
| 922 | } | ||
| 923 | ], | ||
| 924 | "responses": { | ||
| 925 | "200": { | ||
| 926 | "description": "OK", | ||
| 927 | "schema": { | ||
| 928 | "allOf": [ | ||
| 929 | { | ||
| 930 | "$ref": "#/definitions/models.Response" | ||
| 931 | }, | ||
| 932 | { | ||
| 933 | "type": "object", | ||
| 934 | "properties": { | ||
| 935 | "data": { | ||
| 936 | "$ref": "#/definitions/handlers.EditMapSummaryRequest" | ||
| 937 | } | ||
| 938 | } | ||
| 939 | } | ||
| 940 | ] | ||
| 941 | } | ||
| 942 | } | ||
| 943 | } | ||
| 944 | }, | ||
| 945 | "post": { | ||
| 946 | "description": "Create map summary with specified map id.", | ||
| 947 | "produces": [ | ||
| 948 | "application/json" | ||
| 949 | ], | ||
| 950 | "tags": [ | ||
| 951 | "maps / summary" | ||
| 952 | ], | ||
| 953 | "parameters": [ | ||
| 954 | { | ||
| 955 | "type": "string", | ||
| 956 | "description": "JWT Token", | ||
| 957 | "name": "Authorization", | ||
| 958 | "in": "header", | ||
| 959 | "required": true | ||
| 960 | }, | ||
| 961 | { | ||
| 962 | "type": "integer", | ||
| 963 | "description": "Map ID", | ||
| 964 | "name": "mapid", | ||
| 965 | "in": "path", | ||
| 966 | "required": true | ||
| 967 | }, | ||
| 968 | { | ||
| 969 | "description": "Body", | ||
| 970 | "name": "request", | ||
| 971 | "in": "body", | ||
| 972 | "required": true, | ||
| 973 | "schema": { | ||
| 974 | "$ref": "#/definitions/handlers.CreateMapSummaryRequest" | ||
| 975 | } | ||
| 976 | } | ||
| 977 | ], | ||
| 978 | "responses": { | ||
| 979 | "200": { | ||
| 980 | "description": "OK", | ||
| 981 | "schema": { | ||
| 982 | "allOf": [ | ||
| 983 | { | ||
| 984 | "$ref": "#/definitions/models.Response" | ||
| 985 | }, | ||
| 986 | { | ||
| 987 | "type": "object", | ||
| 988 | "properties": { | ||
| 989 | "data": { | ||
| 990 | "$ref": "#/definitions/handlers.CreateMapSummaryRequest" | ||
| 991 | } | ||
| 992 | } | ||
| 993 | } | ||
| 994 | ] | ||
| 995 | } | ||
| 996 | } | ||
| 997 | } | ||
| 998 | }, | ||
| 999 | "delete": { | ||
| 1000 | "description": "Delete map summary with specified map id.", | ||
| 1001 | "produces": [ | ||
| 1002 | "application/json" | ||
| 1003 | ], | ||
| 1004 | "tags": [ | ||
| 1005 | "maps / summary" | ||
| 1006 | ], | ||
| 1007 | "parameters": [ | ||
| 1008 | { | ||
| 1009 | "type": "string", | ||
| 1010 | "description": "JWT Token", | ||
| 1011 | "name": "Authorization", | ||
| 1012 | "in": "header", | ||
| 1013 | "required": true | ||
| 1014 | }, | ||
| 1015 | { | ||
| 1016 | "type": "integer", | ||
| 1017 | "description": "Map ID", | ||
| 1018 | "name": "mapid", | ||
| 1019 | "in": "path", | ||
| 1020 | "required": true | ||
| 1021 | }, | ||
| 1022 | { | ||
| 1023 | "description": "Body", | ||
| 1024 | "name": "request", | ||
| 1025 | "in": "body", | ||
| 1026 | "required": true, | ||
| 1027 | "schema": { | ||
| 1028 | "$ref": "#/definitions/handlers.DeleteMapSummaryRequest" | ||
| 1029 | } | ||
| 1030 | } | ||
| 1031 | ], | ||
| 1032 | "responses": { | ||
| 1033 | "200": { | ||
| 1034 | "description": "OK", | ||
| 1035 | "schema": { | ||
| 1036 | "allOf": [ | ||
| 1037 | { | ||
| 1038 | "$ref": "#/definitions/models.Response" | ||
| 1039 | }, | ||
| 1040 | { | ||
| 1041 | "type": "object", | ||
| 1042 | "properties": { | ||
| 1043 | "data": { | ||
| 1044 | "$ref": "#/definitions/handlers.DeleteMapSummaryRequest" | ||
| 1045 | } | ||
| 1046 | } | ||
| 1047 | } | ||
| 1048 | ] | ||
| 1049 | } | ||
| 1050 | } | ||
| 1051 | } | ||
| 1052 | } | ||
| 1053 | }, | ||
| 1054 | "/profile": { | ||
| 1055 | "get": { | ||
| 1056 | "description": "Get profile page of session user.", | ||
| 1057 | "consumes": [ | ||
| 1058 | "application/json" | ||
| 1059 | ], | ||
| 1060 | "produces": [ | ||
| 1061 | "application/json" | ||
| 1062 | ], | ||
| 1063 | "tags": [ | ||
| 1064 | "users" | ||
| 1065 | ], | ||
| 1066 | "parameters": [ | ||
| 1067 | { | ||
| 1068 | "type": "string", | ||
| 1069 | "description": "JWT Token", | ||
| 1070 | "name": "Authorization", | ||
| 1071 | "in": "header", | ||
| 1072 | "required": true | ||
| 1073 | } | ||
| 1074 | ], | ||
| 1075 | "responses": { | ||
| 1076 | "200": { | ||
| 1077 | "description": "OK", | ||
| 1078 | "schema": { | ||
| 1079 | "allOf": [ | ||
| 1080 | { | ||
| 1081 | "$ref": "#/definitions/models.Response" | ||
| 1082 | }, | ||
| 1083 | { | ||
| 1084 | "type": "object", | ||
| 1085 | "properties": { | ||
| 1086 | "data": { | ||
| 1087 | "$ref": "#/definitions/handlers.ProfileResponse" | ||
| 1088 | } | ||
| 1089 | } | ||
| 1090 | } | ||
| 1091 | ] | ||
| 1092 | } | ||
| 1093 | } | ||
| 1094 | } | ||
| 1095 | }, | ||
| 1096 | "put": { | ||
| 1097 | "description": "Update country code of session user.", | ||
| 1098 | "consumes": [ | ||
| 1099 | "application/json" | ||
| 1100 | ], | ||
| 1101 | "produces": [ | ||
| 1102 | "application/json" | ||
| 1103 | ], | ||
| 1104 | "tags": [ | ||
| 1105 | "users" | ||
| 1106 | ], | ||
| 1107 | "parameters": [ | ||
| 1108 | { | ||
| 1109 | "type": "string", | ||
| 1110 | "description": "JWT Token", | ||
| 1111 | "name": "Authorization", | ||
| 1112 | "in": "header", | ||
| 1113 | "required": true | ||
| 1114 | }, | ||
| 1115 | { | ||
| 1116 | "type": "string", | ||
| 1117 | "description": "Country Code [XX]", | ||
| 1118 | "name": "country_code", | ||
| 1119 | "in": "query", | ||
| 1120 | "required": true | ||
| 1121 | } | ||
| 1122 | ], | ||
| 1123 | "responses": { | ||
| 1124 | "200": { | ||
| 1125 | "description": "OK", | ||
| 1126 | "schema": { | ||
| 1127 | "$ref": "#/definitions/models.Response" | ||
| 1128 | } | ||
| 1129 | } | ||
| 1130 | } | ||
| 1131 | }, | ||
| 1132 | "post": { | ||
| 1133 | "description": "Update profile page of session user.", | ||
| 1134 | "consumes": [ | ||
| 1135 | "application/json" | ||
| 1136 | ], | ||
| 1137 | "produces": [ | ||
| 1138 | "application/json" | ||
| 1139 | ], | ||
| 1140 | "tags": [ | ||
| 1141 | "users" | ||
| 1142 | ], | ||
| 1143 | "parameters": [ | ||
| 1144 | { | ||
| 1145 | "type": "string", | ||
| 1146 | "description": "JWT Token", | ||
| 1147 | "name": "Authorization", | ||
| 1148 | "in": "header", | ||
| 1149 | "required": true | ||
| 1150 | } | ||
| 1151 | ], | ||
| 1152 | "responses": { | ||
| 1153 | "200": { | ||
| 1154 | "description": "OK", | ||
| 1155 | "schema": { | ||
| 1156 | "allOf": [ | ||
| 1157 | { | ||
| 1158 | "$ref": "#/definitions/models.Response" | ||
| 1159 | }, | ||
| 1160 | { | ||
| 1161 | "type": "object", | ||
| 1162 | "properties": { | ||
| 1163 | "data": { | ||
| 1164 | "$ref": "#/definitions/handlers.ProfileResponse" | ||
| 1165 | } | ||
| 1166 | } | ||
| 1167 | } | ||
| 1168 | ] | ||
| 1169 | } | ||
| 1170 | } | ||
| 1171 | } | ||
| 1172 | } | ||
| 1173 | }, | ||
| 1174 | "/rankings": { | ||
| 1175 | "get": { | ||
| 1176 | "description": "Get rankings of every player.", | ||
| 1177 | "produces": [ | ||
| 1178 | "application/json" | ||
| 1179 | ], | ||
| 1180 | "tags": [ | ||
| 1181 | "rankings" | ||
| 1182 | ], | ||
| 1183 | "responses": { | ||
| 1184 | "200": { | ||
| 1185 | "description": "OK", | ||
| 1186 | "schema": { | ||
| 1187 | "allOf": [ | ||
| 1188 | { | ||
| 1189 | "$ref": "#/definitions/models.Response" | ||
| 1190 | }, | ||
| 1191 | { | ||
| 1192 | "type": "object", | ||
| 1193 | "properties": { | ||
| 1194 | "data": { | ||
| 1195 | "$ref": "#/definitions/handlers.RankingsResponse" | ||
| 1196 | } | ||
| 1197 | } | ||
| 1198 | } | ||
| 1199 | ] | ||
| 1200 | } | ||
| 1201 | } | ||
| 1202 | } | ||
| 1203 | } | ||
| 1204 | }, | ||
| 1205 | "/search": { | ||
| 1206 | "get": { | ||
| 1207 | "description": "Get all user and map data matching to the query.", | ||
| 1208 | "produces": [ | ||
| 1209 | "application/json" | ||
| 1210 | ], | ||
| 1211 | "tags": [ | ||
| 1212 | "search" | ||
| 1213 | ], | ||
| 1214 | "parameters": [ | ||
| 1215 | { | ||
| 1216 | "type": "string", | ||
| 1217 | "description": "Search user or map name.", | ||
| 1218 | "name": "q", | ||
| 1219 | "in": "query" | ||
| 1220 | } | ||
| 1221 | ], | ||
| 1222 | "responses": { | ||
| 1223 | "200": { | ||
| 1224 | "description": "OK", | ||
| 1225 | "schema": { | ||
| 1226 | "allOf": [ | ||
| 1227 | { | ||
| 1228 | "$ref": "#/definitions/models.Response" | ||
| 1229 | }, | ||
| 1230 | { | ||
| 1231 | "type": "object", | ||
| 1232 | "properties": { | ||
| 1233 | "data": { | ||
| 1234 | "$ref": "#/definitions/handlers.SearchResponse" | ||
| 1235 | } | ||
| 1236 | } | ||
| 1237 | } | ||
| 1238 | ] | ||
| 1239 | } | ||
| 1240 | } | ||
| 1241 | } | ||
| 1242 | } | ||
| 1243 | }, | ||
| 1244 | "/token": { | ||
| 1245 | "get": { | ||
| 1246 | "description": "Gets the token cookie value from the user.", | ||
| 1247 | "produces": [ | ||
| 1248 | "application/json" | ||
| 1249 | ], | ||
| 1250 | "tags": [ | ||
| 1251 | "auth" | ||
| 1252 | ], | ||
| 1253 | "responses": { | ||
| 1254 | "200": { | ||
| 1255 | "description": "OK", | ||
| 1256 | "schema": { | ||
| 1257 | "allOf": [ | ||
| 1258 | { | ||
| 1259 | "$ref": "#/definitions/models.Response" | ||
| 1260 | }, | ||
| 1261 | { | ||
| 1262 | "type": "object", | ||
| 1263 | "properties": { | ||
| 1264 | "data": { | ||
| 1265 | "$ref": "#/definitions/handlers.LoginResponse" | ||
| 1266 | } | ||
| 1267 | } | ||
| 1268 | } | ||
| 1269 | ] | ||
| 1270 | } | ||
| 1271 | }, | ||
| 1272 | "404": { | ||
| 1273 | "description": "Not Found", | ||
| 1274 | "schema": { | ||
| 1275 | "$ref": "#/definitions/models.Response" | ||
| 1276 | } | ||
| 1277 | } | ||
| 1278 | } | ||
| 1279 | }, | ||
| 1280 | "delete": { | ||
| 1281 | "description": "Deletes the token cookie from the user.", | ||
| 1282 | "produces": [ | ||
| 1283 | "application/json" | ||
| 1284 | ], | ||
| 1285 | "tags": [ | ||
| 1286 | "auth" | ||
| 1287 | ], | ||
| 1288 | "responses": { | ||
| 1289 | "200": { | ||
| 1290 | "description": "OK", | ||
| 1291 | "schema": { | ||
| 1292 | "allOf": [ | ||
| 1293 | { | ||
| 1294 | "$ref": "#/definitions/models.Response" | ||
| 1295 | }, | ||
| 1296 | { | ||
| 1297 | "type": "object", | ||
| 1298 | "properties": { | ||
| 1299 | "data": { | ||
| 1300 | "$ref": "#/definitions/handlers.LoginResponse" | ||
| 1301 | } | ||
| 1302 | } | ||
| 1303 | } | ||
| 1304 | ] | ||
| 1305 | } | ||
| 1306 | }, | ||
| 1307 | "404": { | ||
| 1308 | "description": "Not Found", | ||
| 1309 | "schema": { | ||
| 1310 | "$ref": "#/definitions/models.Response" | ||
| 1311 | } | ||
| 1312 | } | ||
| 1313 | } | ||
| 1314 | } | ||
| 1315 | }, | ||
| 1316 | "/users/{userid}": { | ||
| 1317 | "get": { | ||
| 1318 | "description": "Get profile page of another user.", | ||
| 1319 | "consumes": [ | ||
| 1320 | "application/json" | ||
| 1321 | ], | ||
| 1322 | "produces": [ | ||
| 1323 | "application/json" | ||
| 1324 | ], | ||
| 1325 | "tags": [ | ||
| 1326 | "users" | ||
| 1327 | ], | ||
| 1328 | "parameters": [ | ||
| 1329 | { | ||
| 1330 | "type": "integer", | ||
| 1331 | "description": "User ID", | ||
| 1332 | "name": "userid", | ||
| 1333 | "in": "path", | ||
| 1334 | "required": true | ||
| 1335 | } | ||
| 1336 | ], | ||
| 1337 | "responses": { | ||
| 1338 | "200": { | ||
| 1339 | "description": "OK", | ||
| 1340 | "schema": { | ||
| 1341 | "allOf": [ | ||
| 1342 | { | ||
| 1343 | "$ref": "#/definitions/models.Response" | ||
| 1344 | }, | ||
| 1345 | { | ||
| 1346 | "type": "object", | ||
| 1347 | "properties": { | ||
| 1348 | "data": { | ||
| 1349 | "$ref": "#/definitions/handlers.ProfileResponse" | ||
| 1350 | } | ||
| 1351 | } | ||
| 1352 | } | ||
| 1353 | ] | ||
| 1354 | } | ||
| 1355 | } | ||
| 1356 | } | ||
| 1357 | } | ||
| 1358 | } | ||
| 1359 | }, | ||
| 1360 | "definitions": { | ||
| 1361 | "handlers.ChapterMapsResponse": { | ||
| 1362 | "type": "object", | ||
| 1363 | "properties": { | ||
| 1364 | "chapter": { | ||
| 1365 | "$ref": "#/definitions/models.Chapter" | ||
| 1366 | }, | ||
| 1367 | "maps": { | ||
| 1368 | "type": "array", | ||
| 1369 | "items": { | ||
| 1370 | "$ref": "#/definitions/models.MapSelect" | ||
| 1371 | } | ||
| 1372 | } | ||
| 1373 | } | ||
| 1374 | }, | ||
| 1375 | "handlers.ChaptersResponse": { | ||
| 1376 | "type": "object", | ||
| 1377 | "properties": { | ||
| 1378 | "chapters": { | ||
| 1379 | "type": "array", | ||
| 1380 | "items": { | ||
| 1381 | "$ref": "#/definitions/models.Chapter" | ||
| 1382 | } | ||
| 1383 | }, | ||
| 1384 | "game": { | ||
| 1385 | "$ref": "#/definitions/models.Game" | ||
| 1386 | } | ||
| 1387 | } | ||
| 1388 | }, | ||
| 1389 | "handlers.CreateMapDiscussionCommentRequest": { | ||
| 1390 | "type": "object", | ||
| 1391 | "required": [ | ||
| 1392 | "comment" | ||
| 1393 | ], | ||
| 1394 | "properties": { | ||
| 1395 | "comment": { | ||
| 1396 | "type": "string" | ||
| 1397 | } | ||
| 1398 | } | ||
| 1399 | }, | ||
| 1400 | "handlers.CreateMapDiscussionRequest": { | ||
| 1401 | "type": "object", | ||
| 1402 | "required": [ | ||
| 1403 | "content", | ||
| 1404 | "title" | ||
| 1405 | ], | ||
| 1406 | "properties": { | ||
| 1407 | "content": { | ||
| 1408 | "type": "string" | ||
| 1409 | }, | ||
| 1410 | "title": { | ||
| 1411 | "type": "string" | ||
| 1412 | } | ||
| 1413 | } | ||
| 1414 | }, | ||
| 1415 | "handlers.CreateMapSummaryRequest": { | ||
| 1416 | "type": "object", | ||
| 1417 | "required": [ | ||
| 1418 | "category_id", | ||
| 1419 | "description", | ||
| 1420 | "record_date", | ||
| 1421 | "score_count", | ||
| 1422 | "user_name" | ||
| 1423 | ], | ||
| 1424 | "properties": { | ||
| 1425 | "category_id": { | ||
| 1426 | "type": "integer" | ||
| 1427 | }, | ||
| 1428 | "description": { | ||
| 1429 | "type": "string" | ||
| 1430 | }, | ||
| 1431 | "record_date": { | ||
| 1432 | "type": "string" | ||
| 1433 | }, | ||
| 1434 | "score_count": { | ||
| 1435 | "type": "integer" | ||
| 1436 | }, | ||
| 1437 | "showcase": { | ||
| 1438 | "type": "string" | ||
| 1439 | }, | ||
| 1440 | "user_name": { | ||
| 1441 | "type": "string" | ||
| 1442 | } | ||
| 1443 | } | ||
| 1444 | }, | ||
| 1445 | "handlers.DeleteMapSummaryRequest": { | ||
| 1446 | "type": "object", | ||
| 1447 | "required": [ | ||
| 1448 | "route_id" | ||
| 1449 | ], | ||
| 1450 | "properties": { | ||
| 1451 | "route_id": { | ||
| 1452 | "type": "integer" | ||
| 1453 | } | ||
| 1454 | } | ||
| 1455 | }, | ||
| 1456 | "handlers.EditMapDiscussionRequest": { | ||
| 1457 | "type": "object", | ||
| 1458 | "required": [ | ||
| 1459 | "content", | ||
| 1460 | "title" | ||
| 1461 | ], | ||
| 1462 | "properties": { | ||
| 1463 | "content": { | ||
| 1464 | "type": "string" | ||
| 1465 | }, | ||
| 1466 | "title": { | ||
| 1467 | "type": "string" | ||
| 1468 | } | ||
| 1469 | } | ||
| 1470 | }, | ||
| 1471 | "handlers.EditMapImageRequest": { | ||
| 1472 | "type": "object", | ||
| 1473 | "required": [ | ||
| 1474 | "image" | ||
| 1475 | ], | ||
| 1476 | "properties": { | ||
| 1477 | "image": { | ||
| 1478 | "type": "string" | ||
| 1479 | } | ||
| 1480 | } | ||
| 1481 | }, | ||
| 1482 | "handlers.EditMapSummaryRequest": { | ||
| 1483 | "type": "object", | ||
| 1484 | "required": [ | ||
| 1485 | "description", | ||
| 1486 | "record_date", | ||
| 1487 | "route_id", | ||
| 1488 | "score_count", | ||
| 1489 | "user_name" | ||
| 1490 | ], | ||
| 1491 | "properties": { | ||
| 1492 | "description": { | ||
| 1493 | "type": "string" | ||
| 1494 | }, | ||
| 1495 | "record_date": { | ||
| 1496 | "type": "string" | ||
| 1497 | }, | ||
| 1498 | "route_id": { | ||
| 1499 | "type": "integer" | ||
| 1500 | }, | ||
| 1501 | "score_count": { | ||
| 1502 | "type": "integer" | ||
| 1503 | }, | ||
| 1504 | "showcase": { | ||
| 1505 | "type": "string" | ||
| 1506 | }, | ||
| 1507 | "user_name": { | ||
| 1508 | "type": "string" | ||
| 1509 | } | ||
| 1510 | } | ||
| 1511 | }, | ||
| 1512 | "handlers.LoginResponse": { | ||
| 1513 | "type": "object", | ||
| 1514 | "properties": { | ||
| 1515 | "token": { | ||
| 1516 | "type": "string" | ||
| 1517 | } | ||
| 1518 | } | ||
| 1519 | }, | ||
| 1520 | "handlers.LogsResponse": { | ||
| 1521 | "type": "object", | ||
| 1522 | "properties": { | ||
| 1523 | "logs": { | ||
| 1524 | "type": "array", | ||
| 1525 | "items": { | ||
| 1526 | "$ref": "#/definitions/handlers.LogsResponseDetails" | ||
| 1527 | } | ||
| 1528 | } | ||
| 1529 | } | ||
| 1530 | }, | ||
| 1531 | "handlers.LogsResponseDetails": { | ||
| 1532 | "type": "object", | ||
| 1533 | "properties": { | ||
| 1534 | "date": { | ||
| 1535 | "type": "string" | ||
| 1536 | }, | ||
| 1537 | "detail": { | ||
| 1538 | "type": "string" | ||
| 1539 | }, | ||
| 1540 | "message": { | ||
| 1541 | "type": "string" | ||
| 1542 | }, | ||
| 1543 | "user": { | ||
| 1544 | "$ref": "#/definitions/models.UserShort" | ||
| 1545 | } | ||
| 1546 | } | ||
| 1547 | }, | ||
| 1548 | "handlers.MapDiscussion": { | ||
| 1549 | "type": "object", | ||
| 1550 | "properties": { | ||
| 1551 | "comments": { | ||
| 1552 | "type": "array", | ||
| 1553 | "items": { | ||
| 1554 | "$ref": "#/definitions/handlers.MapDiscussionComment" | ||
| 1555 | } | ||
| 1556 | }, | ||
| 1557 | "content": { | ||
| 1558 | "type": "string" | ||
| 1559 | }, | ||
| 1560 | "created_at": { | ||
| 1561 | "description": "Upvotes int ` + "`" + `json:\"upvotes\"` + "`" + `", | ||
| 1562 | "type": "string" | ||
| 1563 | }, | ||
| 1564 | "creator": { | ||
| 1565 | "$ref": "#/definitions/models.UserShortWithAvatar" | ||
| 1566 | }, | ||
| 1567 | "id": { | ||
| 1568 | "type": "integer" | ||
| 1569 | }, | ||
| 1570 | "title": { | ||
| 1571 | "type": "string" | ||
| 1572 | }, | ||
| 1573 | "updated_at": { | ||
| 1574 | "type": "string" | ||
| 1575 | } | ||
| 1576 | } | ||
| 1577 | }, | ||
| 1578 | "handlers.MapDiscussionComment": { | ||
| 1579 | "type": "object", | ||
| 1580 | "properties": { | ||
| 1581 | "comment": { | ||
| 1582 | "type": "string" | ||
| 1583 | }, | ||
| 1584 | "date": { | ||
| 1585 | "type": "string" | ||
| 1586 | }, | ||
| 1587 | "user": { | ||
| 1588 | "$ref": "#/definitions/models.UserShortWithAvatar" | ||
| 1589 | } | ||
| 1590 | } | ||
| 1591 | }, | ||
| 1592 | "handlers.MapDiscussionResponse": { | ||
| 1593 | "type": "object", | ||
| 1594 | "properties": { | ||
| 1595 | "discussion": { | ||
| 1596 | "$ref": "#/definitions/handlers.MapDiscussion" | ||
| 1597 | } | ||
| 1598 | } | ||
| 1599 | }, | ||
| 1600 | "handlers.MapDiscussionsResponse": { | ||
| 1601 | "type": "object", | ||
| 1602 | "properties": { | ||
| 1603 | "discussions": { | ||
| 1604 | "type": "array", | ||
| 1605 | "items": { | ||
| 1606 | "$ref": "#/definitions/handlers.MapDiscussion" | ||
| 1607 | } | ||
| 1608 | } | ||
| 1609 | } | ||
| 1610 | }, | ||
| 1611 | "handlers.MapLeaderboardsResponse": { | ||
| 1612 | "type": "object", | ||
| 1613 | "properties": { | ||
| 1614 | "map": { | ||
| 1615 | "$ref": "#/definitions/models.Map" | ||
| 1616 | }, | ||
| 1617 | "pagination": { | ||
| 1618 | "$ref": "#/definitions/models.Pagination" | ||
| 1619 | }, | ||
| 1620 | "records": {} | ||
| 1621 | } | ||
| 1622 | }, | ||
| 1623 | "handlers.MapShortWithGame": { | ||
| 1624 | "type": "object", | ||
| 1625 | "properties": { | ||
| 1626 | "chapter": { | ||
| 1627 | "type": "string" | ||
| 1628 | }, | ||
| 1629 | "game": { | ||
| 1630 | "type": "string" | ||
| 1631 | }, | ||
| 1632 | "id": { | ||
| 1633 | "type": "integer" | ||
| 1634 | }, | ||
| 1635 | "map": { | ||
| 1636 | "type": "string" | ||
| 1637 | } | ||
| 1638 | } | ||
| 1639 | }, | ||
| 1640 | "handlers.MapSummaryResponse": { | ||
| 1641 | "type": "object", | ||
| 1642 | "properties": { | ||
| 1643 | "map": { | ||
| 1644 | "$ref": "#/definitions/models.Map" | ||
| 1645 | }, | ||
| 1646 | "summary": { | ||
| 1647 | "$ref": "#/definitions/models.MapSummary" | ||
| 1648 | } | ||
| 1649 | } | ||
| 1650 | }, | ||
| 1651 | "handlers.ProfileRankings": { | ||
| 1652 | "type": "object", | ||
| 1653 | "properties": { | ||
| 1654 | "cooperative": { | ||
| 1655 | "$ref": "#/definitions/handlers.ProfileRankingsDetails" | ||
| 1656 | }, | ||
| 1657 | "overall": { | ||
| 1658 | "$ref": "#/definitions/handlers.ProfileRankingsDetails" | ||
| 1659 | }, | ||
| 1660 | "singleplayer": { | ||
| 1661 | "$ref": "#/definitions/handlers.ProfileRankingsDetails" | ||
| 1662 | } | ||
| 1663 | } | ||
| 1664 | }, | ||
| 1665 | "handlers.ProfileRankingsDetails": { | ||
| 1666 | "type": "object", | ||
| 1667 | "properties": { | ||
| 1668 | "completion_count": { | ||
| 1669 | "type": "integer" | ||
| 1670 | }, | ||
| 1671 | "completion_total": { | ||
| 1672 | "type": "integer" | ||
| 1673 | }, | ||
| 1674 | "rank": { | ||
| 1675 | "type": "integer" | ||
| 1676 | } | ||
| 1677 | } | ||
| 1678 | }, | ||
| 1679 | "handlers.ProfileRecords": { | ||
| 1680 | "type": "object", | ||
| 1681 | "properties": { | ||
| 1682 | "category_id": { | ||
| 1683 | "type": "integer" | ||
| 1684 | }, | ||
| 1685 | "game_id": { | ||
| 1686 | "type": "integer" | ||
| 1687 | }, | ||
| 1688 | "map_id": { | ||
| 1689 | "type": "integer" | ||
| 1690 | }, | ||
| 1691 | "map_name": { | ||
| 1692 | "type": "string" | ||
| 1693 | }, | ||
| 1694 | "map_wr_count": { | ||
| 1695 | "type": "integer" | ||
| 1696 | }, | ||
| 1697 | "placement": { | ||
| 1698 | "type": "integer" | ||
| 1699 | }, | ||
| 1700 | "scores": { | ||
| 1701 | "type": "array", | ||
| 1702 | "items": { | ||
| 1703 | "$ref": "#/definitions/handlers.ProfileScores" | ||
| 1704 | } | ||
| 1705 | } | ||
| 1706 | } | ||
| 1707 | }, | ||
| 1708 | "handlers.ProfileResponse": { | ||
| 1709 | "type": "object", | ||
| 1710 | "properties": { | ||
| 1711 | "avatar_link": { | ||
| 1712 | "type": "string" | ||
| 1713 | }, | ||
| 1714 | "country_code": { | ||
| 1715 | "type": "string" | ||
| 1716 | }, | ||
| 1717 | "links": { | ||
| 1718 | "$ref": "#/definitions/models.Links" | ||
| 1719 | }, | ||
| 1720 | "pagination": { | ||
| 1721 | "$ref": "#/definitions/models.Pagination" | ||
| 1722 | }, | ||
| 1723 | "profile": { | ||
| 1724 | "type": "boolean" | ||
| 1725 | }, | ||
| 1726 | "rankings": { | ||
| 1727 | "$ref": "#/definitions/handlers.ProfileRankings" | ||
| 1728 | }, | ||
| 1729 | "records": { | ||
| 1730 | "type": "array", | ||
| 1731 | "items": { | ||
| 1732 | "$ref": "#/definitions/handlers.ProfileRecords" | ||
| 1733 | } | ||
| 1734 | }, | ||
| 1735 | "steam_id": { | ||
| 1736 | "type": "string" | ||
| 1737 | }, | ||
| 1738 | "titles": { | ||
| 1739 | "type": "array", | ||
| 1740 | "items": { | ||
| 1741 | "$ref": "#/definitions/models.Title" | ||
| 1742 | } | ||
| 1743 | }, | ||
| 1744 | "user_name": { | ||
| 1745 | "type": "string" | ||
| 1746 | } | ||
| 1747 | } | ||
| 1748 | }, | ||
| 1749 | "handlers.ProfileScores": { | ||
| 1750 | "type": "object", | ||
| 1751 | "properties": { | ||
| 1752 | "date": { | ||
| 1753 | "type": "string" | ||
| 1754 | }, | ||
| 1755 | "demo_id": { | ||
| 1756 | "type": "string" | ||
| 1757 | }, | ||
| 1758 | "record_id": { | ||
| 1759 | "type": "integer" | ||
| 1760 | }, | ||
| 1761 | "score_count": { | ||
| 1762 | "type": "integer" | ||
| 1763 | }, | ||
| 1764 | "score_time": { | ||
| 1765 | "type": "integer" | ||
| 1766 | } | ||
| 1767 | } | ||
| 1768 | }, | ||
| 1769 | "handlers.RankingsResponse": { | ||
| 1770 | "type": "object", | ||
| 1771 | "properties": { | ||
| 1772 | "rankings_multiplayer": { | ||
| 1773 | "type": "array", | ||
| 1774 | "items": { | ||
| 1775 | "$ref": "#/definitions/models.UserRanking" | ||
| 1776 | } | ||
| 1777 | }, | ||
| 1778 | "rankings_overall": { | ||
| 1779 | "type": "array", | ||
| 1780 | "items": { | ||
| 1781 | "$ref": "#/definitions/models.UserRanking" | ||
| 1782 | } | ||
| 1783 | }, | ||
| 1784 | "rankings_singleplayer": { | ||
| 1785 | "type": "array", | ||
| 1786 | "items": { | ||
| 1787 | "$ref": "#/definitions/models.UserRanking" | ||
| 1788 | } | ||
| 1789 | } | ||
| 1790 | } | ||
| 1791 | }, | ||
| 1792 | "handlers.RecordResponse": { | ||
| 1793 | "type": "object", | ||
| 1794 | "properties": { | ||
| 1795 | "score_count": { | ||
| 1796 | "type": "integer" | ||
| 1797 | }, | ||
| 1798 | "score_time": { | ||
| 1799 | "type": "integer" | ||
| 1800 | } | ||
| 1801 | } | ||
| 1802 | }, | ||
| 1803 | "handlers.ScoreLogsResponse": { | ||
| 1804 | "type": "object", | ||
| 1805 | "properties": { | ||
| 1806 | "scores": { | ||
| 1807 | "type": "array", | ||
| 1808 | "items": { | ||
| 1809 | "$ref": "#/definitions/handlers.ScoreLogsResponseDetails" | ||
| 1810 | } | ||
| 1811 | } | ||
| 1812 | } | ||
| 1813 | }, | ||
| 1814 | "handlers.ScoreLogsResponseDetails": { | ||
| 1815 | "type": "object", | ||
| 1816 | "properties": { | ||
| 1817 | "date": { | ||
| 1818 | "type": "string" | ||
| 1819 | }, | ||
| 1820 | "demo_id": { | ||
| 1821 | "type": "string" | ||
| 1822 | }, | ||
| 1823 | "game": { | ||
| 1824 | "$ref": "#/definitions/models.Game" | ||
| 1825 | }, | ||
| 1826 | "map": { | ||
| 1827 | "$ref": "#/definitions/models.MapShort" | ||
| 1828 | }, | ||
| 1829 | "score_count": { | ||
| 1830 | "type": "integer" | ||
| 1831 | }, | ||
| 1832 | "score_time": { | ||
| 1833 | "type": "integer" | ||
| 1834 | }, | ||
| 1835 | "user": { | ||
| 1836 | "$ref": "#/definitions/models.UserShort" | ||
| 1837 | } | ||
| 1838 | } | ||
| 1839 | }, | ||
| 1840 | "handlers.SearchResponse": { | ||
| 1841 | "type": "object", | ||
| 1842 | "properties": { | ||
| 1843 | "maps": { | ||
| 1844 | "type": "array", | ||
| 1845 | "items": { | ||
| 1846 | "$ref": "#/definitions/handlers.MapShortWithGame" | ||
| 1847 | } | ||
| 1848 | }, | ||
| 1849 | "players": { | ||
| 1850 | "type": "array", | ||
| 1851 | "items": { | ||
| 1852 | "$ref": "#/definitions/models.UserShortWithAvatar" | ||
| 1853 | } | ||
| 1854 | } | ||
| 1855 | } | ||
| 1856 | }, | ||
| 1857 | "models.Category": { | ||
| 1858 | "type": "object", | ||
| 1859 | "properties": { | ||
| 1860 | "id": { | ||
| 1861 | "type": "integer" | ||
| 1862 | }, | ||
| 1863 | "name": { | ||
| 1864 | "type": "string" | ||
| 1865 | } | ||
| 1866 | } | ||
| 1867 | }, | ||
| 1868 | "models.CategoryPortal": { | ||
| 1869 | "type": "object", | ||
| 1870 | "properties": { | ||
| 1871 | "category": { | ||
| 1872 | "$ref": "#/definitions/models.Category" | ||
| 1873 | }, | ||
| 1874 | "portal_count": { | ||
| 1875 | "type": "integer" | ||
| 1876 | } | ||
| 1877 | } | ||
| 1878 | }, | ||
| 1879 | "models.Chapter": { | ||
| 1880 | "type": "object", | ||
| 1881 | "properties": { | ||
| 1882 | "id": { | ||
| 1883 | "type": "integer" | ||
| 1884 | }, | ||
| 1885 | "image": { | ||
| 1886 | "type": "string" | ||
| 1887 | }, | ||
| 1888 | "is_disabled": { | ||
| 1889 | "type": "boolean" | ||
| 1890 | }, | ||
| 1891 | "name": { | ||
| 1892 | "type": "string" | ||
| 1893 | } | ||
| 1894 | } | ||
| 1895 | }, | ||
| 1896 | "models.Game": { | ||
| 1897 | "type": "object", | ||
| 1898 | "properties": { | ||
| 1899 | "category_portals": { | ||
| 1900 | "type": "array", | ||
| 1901 | "items": { | ||
| 1902 | "$ref": "#/definitions/models.CategoryPortal" | ||
| 1903 | } | ||
| 1904 | }, | ||
| 1905 | "id": { | ||
| 1906 | "type": "integer" | ||
| 1907 | }, | ||
| 1908 | "image": { | ||
| 1909 | "type": "string" | ||
| 1910 | }, | ||
| 1911 | "is_coop": { | ||
| 1912 | "type": "boolean" | ||
| 1913 | }, | ||
| 1914 | "name": { | ||
| 1915 | "type": "string" | ||
| 1916 | } | ||
| 1917 | } | ||
| 1918 | }, | ||
| 1919 | "models.Links": { | ||
| 1920 | "type": "object", | ||
| 1921 | "properties": { | ||
| 1922 | "p2sr": { | ||
| 1923 | "type": "string" | ||
| 1924 | }, | ||
| 1925 | "steam": { | ||
| 1926 | "type": "string" | ||
| 1927 | }, | ||
| 1928 | "twitch": { | ||
| 1929 | "type": "string" | ||
| 1930 | }, | ||
| 1931 | "youtube": { | ||
| 1932 | "type": "string" | ||
| 1933 | } | ||
| 1934 | } | ||
| 1935 | }, | ||
| 1936 | "models.Map": { | ||
| 1937 | "type": "object", | ||
| 1938 | "properties": { | ||
| 1939 | "chapter_name": { | ||
| 1940 | "type": "string" | ||
| 1941 | }, | ||
| 1942 | "game_name": { | ||
| 1943 | "type": "string" | ||
| 1944 | }, | ||
| 1945 | "id": { | ||
| 1946 | "type": "integer" | ||
| 1947 | }, | ||
| 1948 | "image": { | ||
| 1949 | "type": "string" | ||
| 1950 | }, | ||
| 1951 | "is_coop": { | ||
| 1952 | "type": "boolean" | ||
| 1953 | }, | ||
| 1954 | "is_disabled": { | ||
| 1955 | "type": "boolean" | ||
| 1956 | }, | ||
| 1957 | "map_name": { | ||
| 1958 | "type": "string" | ||
| 1959 | } | ||
| 1960 | } | ||
| 1961 | }, | ||
| 1962 | "models.MapHistory": { | ||
| 1963 | "type": "object", | ||
| 1964 | "properties": { | ||
| 1965 | "date": { | ||
| 1966 | "type": "string" | ||
| 1967 | }, | ||
| 1968 | "runner_name": { | ||
| 1969 | "type": "string" | ||
| 1970 | }, | ||
| 1971 | "score_count": { | ||
| 1972 | "type": "integer" | ||
| 1973 | } | ||
| 1974 | } | ||
| 1975 | }, | ||
| 1976 | "models.MapRoute": { | ||
| 1977 | "type": "object", | ||
| 1978 | "properties": { | ||
| 1979 | "category": { | ||
| 1980 | "$ref": "#/definitions/models.Category" | ||
| 1981 | }, | ||
| 1982 | "completion_count": { | ||
| 1983 | "type": "integer" | ||
| 1984 | }, | ||
| 1985 | "description": { | ||
| 1986 | "type": "string" | ||
| 1987 | }, | ||
| 1988 | "history": { | ||
| 1989 | "$ref": "#/definitions/models.MapHistory" | ||
| 1990 | }, | ||
| 1991 | "rating": { | ||
| 1992 | "type": "number" | ||
| 1993 | }, | ||
| 1994 | "route_id": { | ||
| 1995 | "type": "integer" | ||
| 1996 | }, | ||
| 1997 | "showcase": { | ||
| 1998 | "type": "string" | ||
| 1999 | } | ||
| 2000 | } | ||
| 2001 | }, | ||
| 2002 | "models.MapSelect": { | ||
| 2003 | "type": "object", | ||
| 2004 | "properties": { | ||
| 2005 | "category_portals": { | ||
| 2006 | "type": "array", | ||
| 2007 | "items": { | ||
| 2008 | "$ref": "#/definitions/models.CategoryPortal" | ||
| 2009 | } | ||
| 2010 | }, | ||
| 2011 | "difficulty": { | ||
| 2012 | "type": "integer" | ||
| 2013 | }, | ||
| 2014 | "id": { | ||
| 2015 | "type": "integer" | ||
| 2016 | }, | ||
| 2017 | "image": { | ||
| 2018 | "type": "string" | ||
| 2019 | }, | ||
| 2020 | "is_disabled": { | ||
| 2021 | "type": "boolean" | ||
| 2022 | }, | ||
| 2023 | "name": { | ||
| 2024 | "type": "string" | ||
| 2025 | } | ||
| 2026 | } | ||
| 2027 | }, | ||
| 2028 | "models.MapShort": { | ||
| 2029 | "type": "object", | ||
| 2030 | "properties": { | ||
| 2031 | "difficulty": { | ||
| 2032 | "type": "integer" | ||
| 2033 | }, | ||
| 2034 | "id": { | ||
| 2035 | "type": "integer" | ||
| 2036 | }, | ||
| 2037 | "image": { | ||
| 2038 | "type": "string" | ||
| 2039 | }, | ||
| 2040 | "is_disabled": { | ||
| 2041 | "type": "boolean" | ||
| 2042 | }, | ||
| 2043 | "name": { | ||
| 2044 | "type": "string" | ||
| 2045 | }, | ||
| 2046 | "portal_count": { | ||
| 2047 | "type": "integer" | ||
| 2048 | } | ||
| 2049 | } | ||
| 2050 | }, | ||
| 2051 | "models.MapSummary": { | ||
| 2052 | "type": "object", | ||
| 2053 | "properties": { | ||
| 2054 | "routes": { | ||
| 2055 | "type": "array", | ||
| 2056 | "items": { | ||
| 2057 | "$ref": "#/definitions/models.MapRoute" | ||
| 2058 | } | ||
| 2059 | } | ||
| 2060 | } | ||
| 2061 | }, | ||
| 2062 | "models.Pagination": { | ||
| 2063 | "type": "object", | ||
| 2064 | "properties": { | ||
| 2065 | "current_page": { | ||
| 2066 | "type": "integer" | ||
| 2067 | }, | ||
| 2068 | "page_size": { | ||
| 2069 | "type": "integer" | ||
| 2070 | }, | ||
| 2071 | "total_pages": { | ||
| 2072 | "type": "integer" | ||
| 2073 | }, | ||
| 2074 | "total_records": { | ||
| 2075 | "type": "integer" | ||
| 2076 | } | ||
| 2077 | } | ||
| 2078 | }, | ||
| 2079 | "models.Response": { | ||
| 2080 | "type": "object", | ||
| 2081 | "properties": { | ||
| 2082 | "data": {}, | ||
| 2083 | "message": { | ||
| 2084 | "type": "string" | ||
| 2085 | }, | ||
| 2086 | "success": { | ||
| 2087 | "type": "boolean" | ||
| 2088 | } | ||
| 2089 | } | ||
| 2090 | }, | ||
| 2091 | "models.Title": { | ||
| 2092 | "type": "object", | ||
| 2093 | "properties": { | ||
| 2094 | "color": { | ||
| 2095 | "type": "string" | ||
| 2096 | }, | ||
| 2097 | "name": { | ||
| 2098 | "type": "string" | ||
| 2099 | } | ||
| 2100 | } | ||
| 2101 | }, | ||
| 2102 | "models.UserRanking": { | ||
| 2103 | "type": "object", | ||
| 2104 | "properties": { | ||
| 2105 | "placement": { | ||
| 2106 | "type": "integer" | ||
| 2107 | }, | ||
| 2108 | "total_score": { | ||
| 2109 | "type": "integer" | ||
| 2110 | }, | ||
| 2111 | "user": { | ||
| 2112 | "$ref": "#/definitions/models.UserShortWithAvatar" | ||
| 2113 | } | ||
| 2114 | } | ||
| 2115 | }, | ||
| 2116 | "models.UserShort": { | ||
| 2117 | "type": "object", | ||
| 2118 | "properties": { | ||
| 2119 | "steam_id": { | ||
| 2120 | "type": "string" | ||
| 2121 | }, | ||
| 2122 | "user_name": { | ||
| 2123 | "type": "string" | ||
| 2124 | } | ||
| 2125 | } | ||
| 2126 | }, | ||
| 2127 | "models.UserShortWithAvatar": { | ||
| 2128 | "type": "object", | ||
| 2129 | "properties": { | ||
| 2130 | "avatar_link": { | ||
| 2131 | "type": "string" | ||
| 2132 | }, | ||
| 2133 | "steam_id": { | ||
| 2134 | "type": "string" | ||
| 2135 | }, | ||
| 2136 | "user_name": { | ||
| 2137 | "type": "string" | ||
| 2138 | } | ||
| 2139 | } | ||
| 2140 | } | ||
| 2141 | } | ||
| 2142 | }` | ||
| 2143 | |||
| 2144 | // SwaggerInfo holds exported Swagger Info so clients can modify it | ||
| 2145 | var SwaggerInfo = &swag.Spec{ | ||
| 2146 | Version: "1.0", | ||
| 2147 | Host: "lp.ardapektezol.com", | ||
| 2148 | BasePath: "/api/v1", | ||
| 2149 | Schemes: []string{}, | ||
| 2150 | Title: "Least Portals Database API", | ||
| 2151 | Description: "Backend API endpoints for the Least Portals Database.", | ||
| 2152 | InfoInstanceName: "swagger", | ||
| 2153 | SwaggerTemplate: docTemplate, | ||
| 2154 | LeftDelim: "{{", | ||
| 2155 | RightDelim: "}}", | ||
| 2156 | } | ||
| 2157 | |||
| 2158 | func init() { | ||
| 2159 | swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) | ||
| 2160 | } | ||
diff --git a/backend/docs/swagger.json b/backend/docs/swagger.json new file mode 100644 index 0000000..6de5978 --- /dev/null +++ b/backend/docs/swagger.json | |||
| @@ -0,0 +1,2136 @@ | |||
| 1 | { | ||
| 2 | "swagger": "2.0", | ||
| 3 | "info": { | ||
| 4 | "description": "Backend API endpoints for the Least Portals Database.", | ||
| 5 | "title": "Least Portals Database API", | ||
| 6 | "contact": {}, | ||
| 7 | "license": { | ||
| 8 | "name": "GNU Affero General Public License, Version 3", | ||
| 9 | "url": "https://www.gnu.org/licenses/agpl-3.0.html" | ||
| 10 | }, | ||
| 11 | "version": "1.0" | ||
| 12 | }, | ||
| 13 | "host": "lp.ardapektezol.com", | ||
| 14 | "basePath": "/api/v1", | ||
| 15 | "paths": { | ||
| 16 | "/chapters/{chapterid}": { | ||
| 17 | "get": { | ||
| 18 | "description": "Get maps from the specified chapter id.", | ||
| 19 | "produces": [ | ||
| 20 | "application/json" | ||
| 21 | ], | ||
| 22 | "tags": [ | ||
| 23 | "games \u0026 chapters" | ||
| 24 | ], | ||
| 25 | "parameters": [ | ||
| 26 | { | ||
| 27 | "type": "integer", | ||
| 28 | "description": "Chapter ID", | ||
| 29 | "name": "chapterid", | ||
| 30 | "in": "path", | ||
| 31 | "required": true | ||
| 32 | } | ||
| 33 | ], | ||
| 34 | "responses": { | ||
| 35 | "200": { | ||
| 36 | "description": "OK", | ||
| 37 | "schema": { | ||
| 38 | "allOf": [ | ||
| 39 | { | ||
| 40 | "$ref": "#/definitions/models.Response" | ||
| 41 | }, | ||
| 42 | { | ||
| 43 | "type": "object", | ||
| 44 | "properties": { | ||
| 45 | "data": { | ||
| 46 | "$ref": "#/definitions/handlers.ChapterMapsResponse" | ||
| 47 | } | ||
| 48 | } | ||
| 49 | } | ||
| 50 | ] | ||
| 51 | } | ||
| 52 | }, | ||
| 53 | "400": { | ||
| 54 | "description": "Bad Request", | ||
| 55 | "schema": { | ||
| 56 | "$ref": "#/definitions/models.Response" | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | } | ||
| 61 | }, | ||
| 62 | "/demos": { | ||
| 63 | "get": { | ||
| 64 | "description": "Get demo with specified demo uuid.", | ||
| 65 | "consumes": [ | ||
| 66 | "application/json" | ||
| 67 | ], | ||
| 68 | "produces": [ | ||
| 69 | "application/octet-stream" | ||
| 70 | ], | ||
| 71 | "tags": [ | ||
| 72 | "demo" | ||
| 73 | ], | ||
| 74 | "parameters": [ | ||
| 75 | { | ||
| 76 | "type": "string", | ||
| 77 | "description": "Demo UUID", | ||
| 78 | "name": "uuid", | ||
| 79 | "in": "query", | ||
| 80 | "required": true | ||
| 81 | } | ||
| 82 | ], | ||
| 83 | "responses": { | ||
| 84 | "200": { | ||
| 85 | "description": "Demo File", | ||
| 86 | "schema": { | ||
| 87 | "type": "file" | ||
| 88 | } | ||
| 89 | } | ||
| 90 | } | ||
| 91 | } | ||
| 92 | }, | ||
| 93 | "/games": { | ||
| 94 | "get": { | ||
| 95 | "description": "Get games from the leaderboards.", | ||
| 96 | "produces": [ | ||
| 97 | "application/json" | ||
| 98 | ], | ||
| 99 | "tags": [ | ||
| 100 | "games \u0026 chapters" | ||
| 101 | ], | ||
| 102 | "responses": { | ||
| 103 | "200": { | ||
| 104 | "description": "OK", | ||
| 105 | "schema": { | ||
| 106 | "allOf": [ | ||
| 107 | { | ||
| 108 | "$ref": "#/definitions/models.Response" | ||
| 109 | }, | ||
| 110 | { | ||
| 111 | "type": "object", | ||
| 112 | "properties": { | ||
| 113 | "data": { | ||
| 114 | "type": "array", | ||
| 115 | "items": { | ||
| 116 | "$ref": "#/definitions/models.Game" | ||
| 117 | } | ||
| 118 | } | ||
| 119 | } | ||
| 120 | } | ||
| 121 | ] | ||
| 122 | } | ||
| 123 | }, | ||
| 124 | "400": { | ||
| 125 | "description": "Bad Request", | ||
| 126 | "schema": { | ||
| 127 | "$ref": "#/definitions/models.Response" | ||
| 128 | } | ||
| 129 | } | ||
| 130 | } | ||
| 131 | } | ||
| 132 | }, | ||
| 133 | "/games/{gameid}": { | ||
| 134 | "get": { | ||
| 135 | "description": "Get chapters from the specified game id.", | ||
| 136 | "produces": [ | ||
| 137 | "application/json" | ||
| 138 | ], | ||
| 139 | "tags": [ | ||
| 140 | "games \u0026 chapters" | ||
| 141 | ], | ||
| 142 | "parameters": [ | ||
| 143 | { | ||
| 144 | "type": "integer", | ||
| 145 | "description": "Game ID", | ||
| 146 | "name": "gameid", | ||
| 147 | "in": "path", | ||
| 148 | "required": true | ||
| 149 | } | ||
| 150 | ], | ||
| 151 | "responses": { | ||
| 152 | "200": { | ||
| 153 | "description": "OK", | ||
| 154 | "schema": { | ||
| 155 | "allOf": [ | ||
| 156 | { | ||
| 157 | "$ref": "#/definitions/models.Response" | ||
| 158 | }, | ||
| 159 | { | ||
| 160 | "type": "object", | ||
| 161 | "properties": { | ||
| 162 | "data": { | ||
| 163 | "$ref": "#/definitions/handlers.ChaptersResponse" | ||
| 164 | } | ||
| 165 | } | ||
| 166 | } | ||
| 167 | ] | ||
| 168 | } | ||
| 169 | } | ||
| 170 | } | ||
| 171 | } | ||
| 172 | }, | ||
| 173 | "/games/{gameid}/maps": { | ||
| 174 | "get": { | ||
| 175 | "description": "Get maps from the specified game id.", | ||
| 176 | "produces": [ | ||
| 177 | "application/json" | ||
| 178 | ], | ||
| 179 | "tags": [ | ||
| 180 | "games \u0026 chapters" | ||
| 181 | ], | ||
| 182 | "parameters": [ | ||
| 183 | { | ||
| 184 | "type": "integer", | ||
| 185 | "description": "Game ID", | ||
| 186 | "name": "gameid", | ||
| 187 | "in": "path", | ||
| 188 | "required": true | ||
| 189 | } | ||
| 190 | ], | ||
| 191 | "responses": { | ||
| 192 | "200": { | ||
| 193 | "description": "OK", | ||
| 194 | "schema": { | ||
| 195 | "allOf": [ | ||
| 196 | { | ||
| 197 | "$ref": "#/definitions/models.Response" | ||
| 198 | }, | ||
| 199 | { | ||
| 200 | "type": "object", | ||
| 201 | "properties": { | ||
| 202 | "data": { | ||
| 203 | "$ref": "#/definitions/handlers.ChaptersResponse" | ||
| 204 | } | ||
| 205 | } | ||
| 206 | } | ||
| 207 | ] | ||
| 208 | } | ||
| 209 | } | ||
| 210 | } | ||
| 211 | } | ||
| 212 | }, | ||
| 213 | "/login": { | ||
| 214 | "get": { | ||
| 215 | "description": "Get (redirect) login page for Steam auth.", | ||
| 216 | "consumes": [ | ||
| 217 | "application/json" | ||
| 218 | ], | ||
| 219 | "produces": [ | ||
| 220 | "application/json" | ||
| 221 | ], | ||
| 222 | "tags": [ | ||
| 223 | "login" | ||
| 224 | ], | ||
| 225 | "responses": { | ||
| 226 | "200": { | ||
| 227 | "description": "OK", | ||
| 228 | "schema": { | ||
| 229 | "allOf": [ | ||
| 230 | { | ||
| 231 | "$ref": "#/definitions/models.Response" | ||
| 232 | }, | ||
| 233 | { | ||
| 234 | "type": "object", | ||
| 235 | "properties": { | ||
| 236 | "data": { | ||
| 237 | "$ref": "#/definitions/handlers.LoginResponse" | ||
| 238 | } | ||
| 239 | } | ||
| 240 | } | ||
| 241 | ] | ||
| 242 | } | ||
| 243 | } | ||
| 244 | } | ||
| 245 | } | ||
| 246 | }, | ||
| 247 | "/logs/mod": { | ||
| 248 | "get": { | ||
| 249 | "description": "Get mod logs.", | ||
| 250 | "produces": [ | ||
| 251 | "application/json" | ||
| 252 | ], | ||
| 253 | "tags": [ | ||
| 254 | "logs" | ||
| 255 | ], | ||
| 256 | "parameters": [ | ||
| 257 | { | ||
| 258 | "type": "string", | ||
| 259 | "description": "JWT Token", | ||
| 260 | "name": "Authorization", | ||
| 261 | "in": "header", | ||
| 262 | "required": true | ||
| 263 | } | ||
| 264 | ], | ||
| 265 | "responses": { | ||
| 266 | "200": { | ||
| 267 | "description": "OK", | ||
| 268 | "schema": { | ||
| 269 | "allOf": [ | ||
| 270 | { | ||
| 271 | "$ref": "#/definitions/models.Response" | ||
| 272 | }, | ||
| 273 | { | ||
| 274 | "type": "object", | ||
| 275 | "properties": { | ||
| 276 | "data": { | ||
| 277 | "$ref": "#/definitions/handlers.LogsResponse" | ||
| 278 | } | ||
| 279 | } | ||
| 280 | } | ||
| 281 | ] | ||
| 282 | } | ||
| 283 | } | ||
| 284 | } | ||
| 285 | } | ||
| 286 | }, | ||
| 287 | "/logs/score": { | ||
| 288 | "get": { | ||
| 289 | "description": "Get score logs of every player.", | ||
| 290 | "produces": [ | ||
| 291 | "application/json" | ||
| 292 | ], | ||
| 293 | "tags": [ | ||
| 294 | "logs" | ||
| 295 | ], | ||
| 296 | "responses": { | ||
| 297 | "200": { | ||
| 298 | "description": "OK", | ||
| 299 | "schema": { | ||
| 300 | "allOf": [ | ||
| 301 | { | ||
| 302 | "$ref": "#/definitions/models.Response" | ||
| 303 | }, | ||
| 304 | { | ||
| 305 | "type": "object", | ||
| 306 | "properties": { | ||
| 307 | "data": { | ||
| 308 | "$ref": "#/definitions/handlers.ScoreLogsResponse" | ||
| 309 | } | ||
| 310 | } | ||
| 311 | } | ||
| 312 | ] | ||
| 313 | } | ||
| 314 | } | ||
| 315 | } | ||
| 316 | } | ||
| 317 | }, | ||
| 318 | "/maps/{mapid}/discussions": { | ||
| 319 | "get": { | ||
| 320 | "description": "Get map discussions with specified map id.", | ||
| 321 | "produces": [ | ||
| 322 | "application/json" | ||
| 323 | ], | ||
| 324 | "tags": [ | ||
| 325 | "maps / discussions" | ||
| 326 | ], | ||
| 327 | "parameters": [ | ||
| 328 | { | ||
| 329 | "type": "integer", | ||
| 330 | "description": "Map ID", | ||
| 331 | "name": "mapid", | ||
| 332 | "in": "path", | ||
| 333 | "required": true | ||
| 334 | } | ||
| 335 | ], | ||
| 336 | "responses": { | ||
| 337 | "200": { | ||
| 338 | "description": "OK", | ||
| 339 | "schema": { | ||
| 340 | "allOf": [ | ||
| 341 | { | ||
| 342 | "$ref": "#/definitions/models.Response" | ||
| 343 | }, | ||
| 344 | { | ||
| 345 | "type": "object", | ||
| 346 | "properties": { | ||
| 347 | "data": { | ||
| 348 | "$ref": "#/definitions/handlers.MapDiscussionsResponse" | ||
| 349 | } | ||
| 350 | } | ||
| 351 | } | ||
| 352 | ] | ||
| 353 | } | ||
| 354 | } | ||
| 355 | } | ||
| 356 | }, | ||
| 357 | "post": { | ||
| 358 | "description": "Create map discussion with specified map id.", | ||
| 359 | "produces": [ | ||
| 360 | "application/json" | ||
| 361 | ], | ||
| 362 | "tags": [ | ||
| 363 | "maps / discussions" | ||
| 364 | ], | ||
| 365 | "parameters": [ | ||
| 366 | { | ||
| 367 | "type": "string", | ||
| 368 | "description": "JWT Token", | ||
| 369 | "name": "Authorization", | ||
| 370 | "in": "header", | ||
| 371 | "required": true | ||
| 372 | }, | ||
| 373 | { | ||
| 374 | "type": "integer", | ||
| 375 | "description": "Map ID", | ||
| 376 | "name": "mapid", | ||
| 377 | "in": "path", | ||
| 378 | "required": true | ||
| 379 | }, | ||
| 380 | { | ||
| 381 | "description": "Body", | ||
| 382 | "name": "request", | ||
| 383 | "in": "body", | ||
| 384 | "required": true, | ||
| 385 | "schema": { | ||
| 386 | "$ref": "#/definitions/handlers.CreateMapDiscussionRequest" | ||
| 387 | } | ||
| 388 | } | ||
| 389 | ], | ||
| 390 | "responses": { | ||
| 391 | "200": { | ||
| 392 | "description": "OK", | ||
| 393 | "schema": { | ||
| 394 | "allOf": [ | ||
| 395 | { | ||
| 396 | "$ref": "#/definitions/models.Response" | ||
| 397 | }, | ||
| 398 | { | ||
| 399 | "type": "object", | ||
| 400 | "properties": { | ||
| 401 | "data": { | ||
| 402 | "$ref": "#/definitions/handlers.CreateMapDiscussionRequest" | ||
| 403 | } | ||
| 404 | } | ||
| 405 | } | ||
| 406 | ] | ||
| 407 | } | ||
| 408 | } | ||
| 409 | } | ||
| 410 | } | ||
| 411 | }, | ||
| 412 | "/maps/{mapid}/discussions/{discussionid}": { | ||
| 413 | "get": { | ||
| 414 | "description": "Get map discussion with specified map and discussion id.", | ||
| 415 | "produces": [ | ||
| 416 | "application/json" | ||
| 417 | ], | ||
| 418 | "tags": [ | ||
| 419 | "maps / discussions" | ||
| 420 | ], | ||
| 421 | "parameters": [ | ||
| 422 | { | ||
| 423 | "type": "integer", | ||
| 424 | "description": "Map ID", | ||
| 425 | "name": "mapid", | ||
| 426 | "in": "path", | ||
| 427 | "required": true | ||
| 428 | }, | ||
| 429 | { | ||
| 430 | "type": "integer", | ||
| 431 | "description": "Discussion ID", | ||
| 432 | "name": "discussionid", | ||
| 433 | "in": "path", | ||
| 434 | "required": true | ||
| 435 | } | ||
| 436 | ], | ||
| 437 | "responses": { | ||
| 438 | "200": { | ||
| 439 | "description": "OK", | ||
| 440 | "schema": { | ||
| 441 | "allOf": [ | ||
| 442 | { | ||
| 443 | "$ref": "#/definitions/models.Response" | ||
| 444 | }, | ||
| 445 | { | ||
| 446 | "type": "object", | ||
| 447 | "properties": { | ||
| 448 | "data": { | ||
| 449 | "$ref": "#/definitions/handlers.MapDiscussionResponse" | ||
| 450 | } | ||
| 451 | } | ||
| 452 | } | ||
| 453 | ] | ||
| 454 | } | ||
| 455 | } | ||
| 456 | } | ||
| 457 | }, | ||
| 458 | "put": { | ||
| 459 | "description": "Edit map discussion with specified map id.", | ||
| 460 | "produces": [ | ||
| 461 | "application/json" | ||
| 462 | ], | ||
| 463 | "tags": [ | ||
| 464 | "maps / discussions" | ||
| 465 | ], | ||
| 466 | "parameters": [ | ||
| 467 | { | ||
| 468 | "type": "string", | ||
| 469 | "description": "JWT Token", | ||
| 470 | "name": "Authorization", | ||
| 471 | "in": "header", | ||
| 472 | "required": true | ||
| 473 | }, | ||
| 474 | { | ||
| 475 | "type": "integer", | ||
| 476 | "description": "Map ID", | ||
| 477 | "name": "mapid", | ||
| 478 | "in": "path", | ||
| 479 | "required": true | ||
| 480 | }, | ||
| 481 | { | ||
| 482 | "type": "integer", | ||
| 483 | "description": "Discussion ID", | ||
| 484 | "name": "discussionid", | ||
| 485 | "in": "path", | ||
| 486 | "required": true | ||
| 487 | }, | ||
| 488 | { | ||
| 489 | "description": "Body", | ||
| 490 | "name": "request", | ||
| 491 | "in": "body", | ||
| 492 | "required": true, | ||
| 493 | "schema": { | ||
| 494 | "$ref": "#/definitions/handlers.EditMapDiscussionRequest" | ||
| 495 | } | ||
| 496 | } | ||
| 497 | ], | ||
| 498 | "responses": { | ||
| 499 | "200": { | ||
| 500 | "description": "OK", | ||
| 501 | "schema": { | ||
| 502 | "allOf": [ | ||
| 503 | { | ||
| 504 | "$ref": "#/definitions/models.Response" | ||
| 505 | }, | ||
| 506 | { | ||
| 507 | "type": "object", | ||
| 508 | "properties": { | ||
| 509 | "data": { | ||
| 510 | "$ref": "#/definitions/handlers.EditMapDiscussionRequest" | ||
| 511 | } | ||
| 512 | } | ||
| 513 | } | ||
| 514 | ] | ||
| 515 | } | ||
| 516 | } | ||
| 517 | } | ||
| 518 | }, | ||
| 519 | "post": { | ||
| 520 | "description": "Create map discussion comment with specified map id.", | ||
| 521 | "produces": [ | ||
| 522 | "application/json" | ||
| 523 | ], | ||
| 524 | "tags": [ | ||
| 525 | "maps / discussions" | ||
| 526 | ], | ||
| 527 | "parameters": [ | ||
| 528 | { | ||
| 529 | "type": "string", | ||
| 530 | "description": "JWT Token", | ||
| 531 | "name": "Authorization", | ||
| 532 | "in": "header", | ||
| 533 | "required": true | ||
| 534 | }, | ||
| 535 | { | ||
| 536 | "type": "integer", | ||
| 537 | "description": "Map ID", | ||
| 538 | "name": "mapid", | ||
| 539 | "in": "path", | ||
| 540 | "required": true | ||
| 541 | }, | ||
| 542 | { | ||
| 543 | "type": "integer", | ||
| 544 | "description": "Discussion ID", | ||
| 545 | "name": "discussionid", | ||
| 546 | "in": "path", | ||
| 547 | "required": true | ||
| 548 | }, | ||
| 549 | { | ||
| 550 | "description": "Body", | ||
| 551 | "name": "request", | ||
| 552 | "in": "body", | ||
| 553 | "required": true, | ||
| 554 | "schema": { | ||
| 555 | "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" | ||
| 556 | } | ||
| 557 | } | ||
| 558 | ], | ||
| 559 | "responses": { | ||
| 560 | "200": { | ||
| 561 | "description": "OK", | ||
| 562 | "schema": { | ||
| 563 | "allOf": [ | ||
| 564 | { | ||
| 565 | "$ref": "#/definitions/models.Response" | ||
| 566 | }, | ||
| 567 | { | ||
| 568 | "type": "object", | ||
| 569 | "properties": { | ||
| 570 | "data": { | ||
| 571 | "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" | ||
| 572 | } | ||
| 573 | } | ||
| 574 | } | ||
| 575 | ] | ||
| 576 | } | ||
| 577 | } | ||
| 578 | } | ||
| 579 | }, | ||
| 580 | "delete": { | ||
| 581 | "description": "Delete map discussion with specified map id.", | ||
| 582 | "produces": [ | ||
| 583 | "application/json" | ||
| 584 | ], | ||
| 585 | "tags": [ | ||
| 586 | "maps / discussions" | ||
| 587 | ], | ||
| 588 | "parameters": [ | ||
| 589 | { | ||
| 590 | "type": "string", | ||
| 591 | "description": "JWT Token", | ||
| 592 | "name": "Authorization", | ||
| 593 | "in": "header", | ||
| 594 | "required": true | ||
| 595 | }, | ||
| 596 | { | ||
| 597 | "type": "integer", | ||
| 598 | "description": "Map ID", | ||
| 599 | "name": "mapid", | ||
| 600 | "in": "path", | ||
| 601 | "required": true | ||
| 602 | }, | ||
| 603 | { | ||
| 604 | "type": "integer", | ||
| 605 | "description": "Discussion ID", | ||
| 606 | "name": "discussionid", | ||
| 607 | "in": "path", | ||
| 608 | "required": true | ||
| 609 | } | ||
| 610 | ], | ||
| 611 | "responses": { | ||
| 612 | "200": { | ||
| 613 | "description": "OK", | ||
| 614 | "schema": { | ||
| 615 | "$ref": "#/definitions/models.Response" | ||
| 616 | } | ||
| 617 | } | ||
| 618 | } | ||
| 619 | } | ||
| 620 | }, | ||
| 621 | "/maps/{mapid}/image": { | ||
| 622 | "put": { | ||
| 623 | "description": "Edit map image with specified map id.", | ||
| 624 | "produces": [ | ||
| 625 | "application/json" | ||
| 626 | ], | ||
| 627 | "tags": [ | ||
| 628 | "maps / summary" | ||
| 629 | ], | ||
| 630 | "parameters": [ | ||
| 631 | { | ||
| 632 | "type": "string", | ||
| 633 | "description": "JWT Token", | ||
| 634 | "name": "Authorization", | ||
| 635 | "in": "header", | ||
| 636 | "required": true | ||
| 637 | }, | ||
| 638 | { | ||
| 639 | "type": "integer", | ||
| 640 | "description": "Map ID", | ||
| 641 | "name": "mapid", | ||
| 642 | "in": "path", | ||
| 643 | "required": true | ||
| 644 | }, | ||
| 645 | { | ||
| 646 | "description": "Body", | ||
| 647 | "name": "request", | ||
| 648 | "in": "body", | ||
| 649 | "required": true, | ||
| 650 | "schema": { | ||
| 651 | "$ref": "#/definitions/handlers.EditMapImageRequest" | ||
| 652 | } | ||
| 653 | } | ||
| 654 | ], | ||
| 655 | "responses": { | ||
| 656 | "200": { | ||
| 657 | "description": "OK", | ||
| 658 | "schema": { | ||
| 659 | "allOf": [ | ||
| 660 | { | ||
| 661 | "$ref": "#/definitions/models.Response" | ||
| 662 | }, | ||
| 663 | { | ||
| 664 | "type": "object", | ||
| 665 | "properties": { | ||
| 666 | "data": { | ||
| 667 | "$ref": "#/definitions/handlers.EditMapImageRequest" | ||
| 668 | } | ||
| 669 | } | ||
| 670 | } | ||
| 671 | ] | ||
| 672 | } | ||
| 673 | } | ||
| 674 | } | ||
| 675 | } | ||
| 676 | }, | ||
| 677 | "/maps/{mapid}/leaderboards": { | ||
| 678 | "get": { | ||
| 679 | "description": "Get map leaderboards with specified id.", | ||
| 680 | "produces": [ | ||
| 681 | "application/json" | ||
| 682 | ], | ||
| 683 | "tags": [ | ||
| 684 | "maps / leaderboards" | ||
| 685 | ], | ||
| 686 | "parameters": [ | ||
| 687 | { | ||
| 688 | "type": "integer", | ||
| 689 | "description": "Map ID", | ||
| 690 | "name": "mapid", | ||
| 691 | "in": "path", | ||
| 692 | "required": true | ||
| 693 | }, | ||
| 694 | { | ||
| 695 | "type": "integer", | ||
| 696 | "description": "Page Number (default: 1)", | ||
| 697 | "name": "page", | ||
| 698 | "in": "query" | ||
| 699 | }, | ||
| 700 | { | ||
| 701 | "type": "integer", | ||
| 702 | "description": "Number of Records Per Page (default: 20)", | ||
| 703 | "name": "pageSize", | ||
| 704 | "in": "query" | ||
| 705 | } | ||
| 706 | ], | ||
| 707 | "responses": { | ||
| 708 | "200": { | ||
| 709 | "description": "OK", | ||
| 710 | "schema": { | ||
| 711 | "allOf": [ | ||
| 712 | { | ||
| 713 | "$ref": "#/definitions/models.Response" | ||
| 714 | }, | ||
| 715 | { | ||
| 716 | "type": "object", | ||
| 717 | "properties": { | ||
| 718 | "data": { | ||
| 719 | "$ref": "#/definitions/handlers.MapLeaderboardsResponse" | ||
| 720 | } | ||
| 721 | } | ||
| 722 | } | ||
| 723 | ] | ||
| 724 | } | ||
| 725 | } | ||
| 726 | } | ||
| 727 | } | ||
| 728 | }, | ||
| 729 | "/maps/{mapid}/record": { | ||
| 730 | "post": { | ||
| 731 | "description": "Post record with demo of a specific map.", | ||
| 732 | "consumes": [ | ||
| 733 | "multipart/form-data" | ||
| 734 | ], | ||
| 735 | "produces": [ | ||
| 736 | "application/json" | ||
| 737 | ], | ||
| 738 | "tags": [ | ||
| 739 | "maps / leaderboards" | ||
| 740 | ], | ||
| 741 | "parameters": [ | ||
| 742 | { | ||
| 743 | "type": "integer", | ||
| 744 | "description": "Map ID", | ||
| 745 | "name": "mapid", | ||
| 746 | "in": "path", | ||
| 747 | "required": true | ||
| 748 | }, | ||
| 749 | { | ||
| 750 | "type": "string", | ||
| 751 | "description": "JWT Token", | ||
| 752 | "name": "Authorization", | ||
| 753 | "in": "header", | ||
| 754 | "required": true | ||
| 755 | }, | ||
| 756 | { | ||
| 757 | "type": "file", | ||
| 758 | "description": "Host Demo", | ||
| 759 | "name": "host_demo", | ||
| 760 | "in": "formData", | ||
| 761 | "required": true | ||
| 762 | }, | ||
| 763 | { | ||
| 764 | "type": "file", | ||
| 765 | "description": "Partner Demo", | ||
| 766 | "name": "partner_demo", | ||
| 767 | "in": "formData" | ||
| 768 | }, | ||
| 769 | { | ||
| 770 | "type": "boolean", | ||
| 771 | "description": "Is Partner Orange", | ||
| 772 | "name": "is_partner_orange", | ||
| 773 | "in": "formData" | ||
| 774 | }, | ||
| 775 | { | ||
| 776 | "type": "string", | ||
| 777 | "description": "Partner ID", | ||
| 778 | "name": "partner_id", | ||
| 779 | "in": "formData" | ||
| 780 | } | ||
| 781 | ], | ||
| 782 | "responses": { | ||
| 783 | "200": { | ||
| 784 | "description": "OK", | ||
| 785 | "schema": { | ||
| 786 | "allOf": [ | ||
| 787 | { | ||
| 788 | "$ref": "#/definitions/models.Response" | ||
| 789 | }, | ||
| 790 | { | ||
| 791 | "type": "object", | ||
| 792 | "properties": { | ||
| 793 | "data": { | ||
| 794 | "$ref": "#/definitions/handlers.RecordResponse" | ||
| 795 | } | ||
| 796 | } | ||
| 797 | } | ||
| 798 | ] | ||
| 799 | } | ||
| 800 | } | ||
| 801 | } | ||
| 802 | } | ||
| 803 | }, | ||
| 804 | "/maps/{mapid}/record/{recordid}": { | ||
| 805 | "delete": { | ||
| 806 | "description": "Delete record with specified map and record id.", | ||
| 807 | "produces": [ | ||
| 808 | "application/json" | ||
| 809 | ], | ||
| 810 | "tags": [ | ||
| 811 | "maps / leaderboards" | ||
| 812 | ], | ||
| 813 | "parameters": [ | ||
| 814 | { | ||
| 815 | "type": "integer", | ||
| 816 | "description": "Map ID", | ||
| 817 | "name": "mapid", | ||
| 818 | "in": "path", | ||
| 819 | "required": true | ||
| 820 | }, | ||
| 821 | { | ||
| 822 | "type": "integer", | ||
| 823 | "description": "Record ID", | ||
| 824 | "name": "recordid", | ||
| 825 | "in": "path", | ||
| 826 | "required": true | ||
| 827 | }, | ||
| 828 | { | ||
| 829 | "type": "string", | ||
| 830 | "description": "JWT Token", | ||
| 831 | "name": "Authorization", | ||
| 832 | "in": "header", | ||
| 833 | "required": true | ||
| 834 | } | ||
| 835 | ], | ||
| 836 | "responses": { | ||
| 837 | "200": { | ||
| 838 | "description": "OK", | ||
| 839 | "schema": { | ||
| 840 | "$ref": "#/definitions/models.Response" | ||
| 841 | } | ||
| 842 | } | ||
| 843 | } | ||
| 844 | } | ||
| 845 | }, | ||
| 846 | "/maps/{mapid}/summary": { | ||
| 847 | "get": { | ||
| 848 | "description": "Get map summary with specified id.", | ||
| 849 | "produces": [ | ||
| 850 | "application/json" | ||
| 851 | ], | ||
| 852 | "tags": [ | ||
| 853 | "maps / summary" | ||
| 854 | ], | ||
| 855 | "parameters": [ | ||
| 856 | { | ||
| 857 | "type": "integer", | ||
| 858 | "description": "Map ID", | ||
| 859 | "name": "mapid", | ||
| 860 | "in": "path", | ||
| 861 | "required": true | ||
| 862 | } | ||
| 863 | ], | ||
| 864 | "responses": { | ||
| 865 | "200": { | ||
| 866 | "description": "OK", | ||
| 867 | "schema": { | ||
| 868 | "allOf": [ | ||
| 869 | { | ||
| 870 | "$ref": "#/definitions/models.Response" | ||
| 871 | }, | ||
| 872 | { | ||
| 873 | "type": "object", | ||
| 874 | "properties": { | ||
| 875 | "data": { | ||
| 876 | "$ref": "#/definitions/handlers.MapSummaryResponse" | ||
| 877 | } | ||
| 878 | } | ||
| 879 | } | ||
| 880 | ] | ||
| 881 | } | ||
| 882 | } | ||
| 883 | } | ||
| 884 | }, | ||
| 885 | "put": { | ||
| 886 | "description": "Edit map summary with specified map id.", | ||
| 887 | "produces": [ | ||
| 888 | "application/json" | ||
| 889 | ], | ||
| 890 | "tags": [ | ||
| 891 | "maps / summary" | ||
| 892 | ], | ||
| 893 | "parameters": [ | ||
| 894 | { | ||
| 895 | "type": "string", | ||
| 896 | "description": "JWT Token", | ||
| 897 | "name": "Authorization", | ||
| 898 | "in": "header", | ||
| 899 | "required": true | ||
| 900 | }, | ||
| 901 | { | ||
| 902 | "type": "integer", | ||
| 903 | "description": "Map ID", | ||
| 904 | "name": "mapid", | ||
| 905 | "in": "path", | ||
| 906 | "required": true | ||
| 907 | }, | ||
| 908 | { | ||
| 909 | "description": "Body", | ||
| 910 | "name": "request", | ||
| 911 | "in": "body", | ||
| 912 | "required": true, | ||
| 913 | "schema": { | ||
| 914 | "$ref": "#/definitions/handlers.EditMapSummaryRequest" | ||
| 915 | } | ||
| 916 | } | ||
| 917 | ], | ||
| 918 | "responses": { | ||
| 919 | "200": { | ||
| 920 | "description": "OK", | ||
| 921 | "schema": { | ||
| 922 | "allOf": [ | ||
| 923 | { | ||
| 924 | "$ref": "#/definitions/models.Response" | ||
| 925 | }, | ||
| 926 | { | ||
| 927 | "type": "object", | ||
| 928 | "properties": { | ||
| 929 | "data": { | ||
| 930 | "$ref": "#/definitions/handlers.EditMapSummaryRequest" | ||
| 931 | } | ||
| 932 | } | ||
| 933 | } | ||
| 934 | ] | ||
| 935 | } | ||
| 936 | } | ||
| 937 | } | ||
| 938 | }, | ||
| 939 | "post": { | ||
| 940 | "description": "Create map summary with specified map id.", | ||
| 941 | "produces": [ | ||
| 942 | "application/json" | ||
| 943 | ], | ||
| 944 | "tags": [ | ||
| 945 | "maps / summary" | ||
| 946 | ], | ||
| 947 | "parameters": [ | ||
| 948 | { | ||
| 949 | "type": "string", | ||
| 950 | "description": "JWT Token", | ||
| 951 | "name": "Authorization", | ||
| 952 | "in": "header", | ||
| 953 | "required": true | ||
| 954 | }, | ||
| 955 | { | ||
| 956 | "type": "integer", | ||
| 957 | "description": "Map ID", | ||
| 958 | "name": "mapid", | ||
| 959 | "in": "path", | ||
| 960 | "required": true | ||
| 961 | }, | ||
| 962 | { | ||
| 963 | "description": "Body", | ||
| 964 | "name": "request", | ||
| 965 | "in": "body", | ||
| 966 | "required": true, | ||
| 967 | "schema": { | ||
| 968 | "$ref": "#/definitions/handlers.CreateMapSummaryRequest" | ||
| 969 | } | ||
| 970 | } | ||
| 971 | ], | ||
| 972 | "responses": { | ||
| 973 | "200": { | ||
| 974 | "description": "OK", | ||
| 975 | "schema": { | ||
| 976 | "allOf": [ | ||
| 977 | { | ||
| 978 | "$ref": "#/definitions/models.Response" | ||
| 979 | }, | ||
| 980 | { | ||
| 981 | "type": "object", | ||
| 982 | "properties": { | ||
| 983 | "data": { | ||
| 984 | "$ref": "#/definitions/handlers.CreateMapSummaryRequest" | ||
| 985 | } | ||
| 986 | } | ||
| 987 | } | ||
| 988 | ] | ||
| 989 | } | ||
| 990 | } | ||
| 991 | } | ||
| 992 | }, | ||
| 993 | "delete": { | ||
| 994 | "description": "Delete map summary with specified map id.", | ||
| 995 | "produces": [ | ||
| 996 | "application/json" | ||
| 997 | ], | ||
| 998 | "tags": [ | ||
| 999 | "maps / summary" | ||
| 1000 | ], | ||
| 1001 | "parameters": [ | ||
| 1002 | { | ||
| 1003 | "type": "string", | ||
| 1004 | "description": "JWT Token", | ||
| 1005 | "name": "Authorization", | ||
| 1006 | "in": "header", | ||
| 1007 | "required": true | ||
| 1008 | }, | ||
| 1009 | { | ||
| 1010 | "type": "integer", | ||
| 1011 | "description": "Map ID", | ||
| 1012 | "name": "mapid", | ||
| 1013 | "in": "path", | ||
| 1014 | "required": true | ||
| 1015 | }, | ||
| 1016 | { | ||
| 1017 | "description": "Body", | ||
| 1018 | "name": "request", | ||
| 1019 | "in": "body", | ||
| 1020 | "required": true, | ||
| 1021 | "schema": { | ||
| 1022 | "$ref": "#/definitions/handlers.DeleteMapSummaryRequest" | ||
| 1023 | } | ||
| 1024 | } | ||
| 1025 | ], | ||
| 1026 | "responses": { | ||
| 1027 | "200": { | ||
| 1028 | "description": "OK", | ||
| 1029 | "schema": { | ||
| 1030 | "allOf": [ | ||
| 1031 | { | ||
| 1032 | "$ref": "#/definitions/models.Response" | ||
| 1033 | }, | ||
| 1034 | { | ||
| 1035 | "type": "object", | ||
| 1036 | "properties": { | ||
| 1037 | "data": { | ||
| 1038 | "$ref": "#/definitions/handlers.DeleteMapSummaryRequest" | ||
| 1039 | } | ||
| 1040 | } | ||
| 1041 | } | ||
| 1042 | ] | ||
| 1043 | } | ||
| 1044 | } | ||
| 1045 | } | ||
| 1046 | } | ||
| 1047 | }, | ||
| 1048 | "/profile": { | ||
| 1049 | "get": { | ||
| 1050 | "description": "Get profile page of session user.", | ||
| 1051 | "consumes": [ | ||
| 1052 | "application/json" | ||
| 1053 | ], | ||
| 1054 | "produces": [ | ||
| 1055 | "application/json" | ||
| 1056 | ], | ||
| 1057 | "tags": [ | ||
| 1058 | "users" | ||
| 1059 | ], | ||
| 1060 | "parameters": [ | ||
| 1061 | { | ||
| 1062 | "type": "string", | ||
| 1063 | "description": "JWT Token", | ||
| 1064 | "name": "Authorization", | ||
| 1065 | "in": "header", | ||
| 1066 | "required": true | ||
| 1067 | } | ||
| 1068 | ], | ||
| 1069 | "responses": { | ||
| 1070 | "200": { | ||
| 1071 | "description": "OK", | ||
| 1072 | "schema": { | ||
| 1073 | "allOf": [ | ||
| 1074 | { | ||
| 1075 | "$ref": "#/definitions/models.Response" | ||
| 1076 | }, | ||
| 1077 | { | ||
| 1078 | "type": "object", | ||
| 1079 | "properties": { | ||
| 1080 | "data": { | ||
| 1081 | "$ref": "#/definitions/handlers.ProfileResponse" | ||
| 1082 | } | ||
| 1083 | } | ||
| 1084 | } | ||
| 1085 | ] | ||
| 1086 | } | ||
| 1087 | } | ||
| 1088 | } | ||
| 1089 | }, | ||
| 1090 | "put": { | ||
| 1091 | "description": "Update country code of session user.", | ||
| 1092 | "consumes": [ | ||
| 1093 | "application/json" | ||
| 1094 | ], | ||
| 1095 | "produces": [ | ||
| 1096 | "application/json" | ||
| 1097 | ], | ||
| 1098 | "tags": [ | ||
| 1099 | "users" | ||
| 1100 | ], | ||
| 1101 | "parameters": [ | ||
| 1102 | { | ||
| 1103 | "type": "string", | ||
| 1104 | "description": "JWT Token", | ||
| 1105 | "name": "Authorization", | ||
| 1106 | "in": "header", | ||
| 1107 | "required": true | ||
| 1108 | }, | ||
| 1109 | { | ||
| 1110 | "type": "string", | ||
| 1111 | "description": "Country Code [XX]", | ||
| 1112 | "name": "country_code", | ||
| 1113 | "in": "query", | ||
| 1114 | "required": true | ||
| 1115 | } | ||
| 1116 | ], | ||
| 1117 | "responses": { | ||
| 1118 | "200": { | ||
| 1119 | "description": "OK", | ||
| 1120 | "schema": { | ||
| 1121 | "$ref": "#/definitions/models.Response" | ||
| 1122 | } | ||
| 1123 | } | ||
| 1124 | } | ||
| 1125 | }, | ||
| 1126 | "post": { | ||
| 1127 | "description": "Update profile page of session user.", | ||
| 1128 | "consumes": [ | ||
| 1129 | "application/json" | ||
| 1130 | ], | ||
| 1131 | "produces": [ | ||
| 1132 | "application/json" | ||
| 1133 | ], | ||
| 1134 | "tags": [ | ||
| 1135 | "users" | ||
| 1136 | ], | ||
| 1137 | "parameters": [ | ||
| 1138 | { | ||
| 1139 | "type": "string", | ||
| 1140 | "description": "JWT Token", | ||
| 1141 | "name": "Authorization", | ||
| 1142 | "in": "header", | ||
| 1143 | "required": true | ||
| 1144 | } | ||
| 1145 | ], | ||
| 1146 | "responses": { | ||
| 1147 | "200": { | ||
| 1148 | "description": "OK", | ||
| 1149 | "schema": { | ||
| 1150 | "allOf": [ | ||
| 1151 | { | ||
| 1152 | "$ref": "#/definitions/models.Response" | ||
| 1153 | }, | ||
| 1154 | { | ||
| 1155 | "type": "object", | ||
| 1156 | "properties": { | ||
| 1157 | "data": { | ||
| 1158 | "$ref": "#/definitions/handlers.ProfileResponse" | ||
| 1159 | } | ||
| 1160 | } | ||
| 1161 | } | ||
| 1162 | ] | ||
| 1163 | } | ||
| 1164 | } | ||
| 1165 | } | ||
| 1166 | } | ||
| 1167 | }, | ||
| 1168 | "/rankings": { | ||
| 1169 | "get": { | ||
| 1170 | "description": "Get rankings of every player.", | ||
| 1171 | "produces": [ | ||
| 1172 | "application/json" | ||
| 1173 | ], | ||
| 1174 | "tags": [ | ||
| 1175 | "rankings" | ||
| 1176 | ], | ||
| 1177 | "responses": { | ||
| 1178 | "200": { | ||
| 1179 | "description": "OK", | ||
| 1180 | "schema": { | ||
| 1181 | "allOf": [ | ||
| 1182 | { | ||
| 1183 | "$ref": "#/definitions/models.Response" | ||
| 1184 | }, | ||
| 1185 | { | ||
| 1186 | "type": "object", | ||
| 1187 | "properties": { | ||
| 1188 | "data": { | ||
| 1189 | "$ref": "#/definitions/handlers.RankingsResponse" | ||
| 1190 | } | ||
| 1191 | } | ||
| 1192 | } | ||
| 1193 | ] | ||
| 1194 | } | ||
| 1195 | } | ||
| 1196 | } | ||
| 1197 | } | ||
| 1198 | }, | ||
| 1199 | "/search": { | ||
| 1200 | "get": { | ||
| 1201 | "description": "Get all user and map data matching to the query.", | ||
| 1202 | "produces": [ | ||
| 1203 | "application/json" | ||
| 1204 | ], | ||
| 1205 | "tags": [ | ||
| 1206 | "search" | ||
| 1207 | ], | ||
| 1208 | "parameters": [ | ||
| 1209 | { | ||
| 1210 | "type": "string", | ||
| 1211 | "description": "Search user or map name.", | ||
| 1212 | "name": "q", | ||
| 1213 | "in": "query" | ||
| 1214 | } | ||
| 1215 | ], | ||
| 1216 | "responses": { | ||
| 1217 | "200": { | ||
| 1218 | "description": "OK", | ||
| 1219 | "schema": { | ||
| 1220 | "allOf": [ | ||
| 1221 | { | ||
| 1222 | "$ref": "#/definitions/models.Response" | ||
| 1223 | }, | ||
| 1224 | { | ||
| 1225 | "type": "object", | ||
| 1226 | "properties": { | ||
| 1227 | "data": { | ||
| 1228 | "$ref": "#/definitions/handlers.SearchResponse" | ||
| 1229 | } | ||
| 1230 | } | ||
| 1231 | } | ||
| 1232 | ] | ||
| 1233 | } | ||
| 1234 | } | ||
| 1235 | } | ||
| 1236 | } | ||
| 1237 | }, | ||
| 1238 | "/token": { | ||
| 1239 | "get": { | ||
| 1240 | "description": "Gets the token cookie value from the user.", | ||
| 1241 | "produces": [ | ||
| 1242 | "application/json" | ||
| 1243 | ], | ||
| 1244 | "tags": [ | ||
| 1245 | "auth" | ||
| 1246 | ], | ||
| 1247 | "responses": { | ||
| 1248 | "200": { | ||
| 1249 | "description": "OK", | ||
| 1250 | "schema": { | ||
| 1251 | "allOf": [ | ||
| 1252 | { | ||
| 1253 | "$ref": "#/definitions/models.Response" | ||
| 1254 | }, | ||
| 1255 | { | ||
| 1256 | "type": "object", | ||
| 1257 | "properties": { | ||
| 1258 | "data": { | ||
| 1259 | "$ref": "#/definitions/handlers.LoginResponse" | ||
| 1260 | } | ||
| 1261 | } | ||
| 1262 | } | ||
| 1263 | ] | ||
| 1264 | } | ||
| 1265 | }, | ||
| 1266 | "404": { | ||
| 1267 | "description": "Not Found", | ||
| 1268 | "schema": { | ||
| 1269 | "$ref": "#/definitions/models.Response" | ||
| 1270 | } | ||
| 1271 | } | ||
| 1272 | } | ||
| 1273 | }, | ||
| 1274 | "delete": { | ||
| 1275 | "description": "Deletes the token cookie from the user.", | ||
| 1276 | "produces": [ | ||
| 1277 | "application/json" | ||
| 1278 | ], | ||
| 1279 | "tags": [ | ||
| 1280 | "auth" | ||
| 1281 | ], | ||
| 1282 | "responses": { | ||
| 1283 | "200": { | ||
| 1284 | "description": "OK", | ||
| 1285 | "schema": { | ||
| 1286 | "allOf": [ | ||
| 1287 | { | ||
| 1288 | "$ref": "#/definitions/models.Response" | ||
| 1289 | }, | ||
| 1290 | { | ||
| 1291 | "type": "object", | ||
| 1292 | "properties": { | ||
| 1293 | "data": { | ||
| 1294 | "$ref": "#/definitions/handlers.LoginResponse" | ||
| 1295 | } | ||
| 1296 | } | ||
| 1297 | } | ||
| 1298 | ] | ||
| 1299 | } | ||
| 1300 | }, | ||
| 1301 | "404": { | ||
| 1302 | "description": "Not Found", | ||
| 1303 | "schema": { | ||
| 1304 | "$ref": "#/definitions/models.Response" | ||
| 1305 | } | ||
| 1306 | } | ||
| 1307 | } | ||
| 1308 | } | ||
| 1309 | }, | ||
| 1310 | "/users/{userid}": { | ||
| 1311 | "get": { | ||
| 1312 | "description": "Get profile page of another user.", | ||
| 1313 | "consumes": [ | ||
| 1314 | "application/json" | ||
| 1315 | ], | ||
| 1316 | "produces": [ | ||
| 1317 | "application/json" | ||
| 1318 | ], | ||
| 1319 | "tags": [ | ||
| 1320 | "users" | ||
| 1321 | ], | ||
| 1322 | "parameters": [ | ||
| 1323 | { | ||
| 1324 | "type": "integer", | ||
| 1325 | "description": "User ID", | ||
| 1326 | "name": "userid", | ||
| 1327 | "in": "path", | ||
| 1328 | "required": true | ||
| 1329 | } | ||
| 1330 | ], | ||
| 1331 | "responses": { | ||
| 1332 | "200": { | ||
| 1333 | "description": "OK", | ||
| 1334 | "schema": { | ||
| 1335 | "allOf": [ | ||
| 1336 | { | ||
| 1337 | "$ref": "#/definitions/models.Response" | ||
| 1338 | }, | ||
| 1339 | { | ||
| 1340 | "type": "object", | ||
| 1341 | "properties": { | ||
| 1342 | "data": { | ||
| 1343 | "$ref": "#/definitions/handlers.ProfileResponse" | ||
| 1344 | } | ||
| 1345 | } | ||
| 1346 | } | ||
| 1347 | ] | ||
| 1348 | } | ||
| 1349 | } | ||
| 1350 | } | ||
| 1351 | } | ||
| 1352 | } | ||
| 1353 | }, | ||
| 1354 | "definitions": { | ||
| 1355 | "handlers.ChapterMapsResponse": { | ||
| 1356 | "type": "object", | ||
| 1357 | "properties": { | ||
| 1358 | "chapter": { | ||
| 1359 | "$ref": "#/definitions/models.Chapter" | ||
| 1360 | }, | ||
| 1361 | "maps": { | ||
| 1362 | "type": "array", | ||
| 1363 | "items": { | ||
| 1364 | "$ref": "#/definitions/models.MapSelect" | ||
| 1365 | } | ||
| 1366 | } | ||
| 1367 | } | ||
| 1368 | }, | ||
| 1369 | "handlers.ChaptersResponse": { | ||
| 1370 | "type": "object", | ||
| 1371 | "properties": { | ||
| 1372 | "chapters": { | ||
| 1373 | "type": "array", | ||
| 1374 | "items": { | ||
| 1375 | "$ref": "#/definitions/models.Chapter" | ||
| 1376 | } | ||
| 1377 | }, | ||
| 1378 | "game": { | ||
| 1379 | "$ref": "#/definitions/models.Game" | ||
| 1380 | } | ||
| 1381 | } | ||
| 1382 | }, | ||
| 1383 | "handlers.CreateMapDiscussionCommentRequest": { | ||
| 1384 | "type": "object", | ||
| 1385 | "required": [ | ||
| 1386 | "comment" | ||
| 1387 | ], | ||
| 1388 | "properties": { | ||
| 1389 | "comment": { | ||
| 1390 | "type": "string" | ||
| 1391 | } | ||
| 1392 | } | ||
| 1393 | }, | ||
| 1394 | "handlers.CreateMapDiscussionRequest": { | ||
| 1395 | "type": "object", | ||
| 1396 | "required": [ | ||
| 1397 | "content", | ||
| 1398 | "title" | ||
| 1399 | ], | ||
| 1400 | "properties": { | ||
| 1401 | "content": { | ||
| 1402 | "type": "string" | ||
| 1403 | }, | ||
| 1404 | "title": { | ||
| 1405 | "type": "string" | ||
| 1406 | } | ||
| 1407 | } | ||
| 1408 | }, | ||
| 1409 | "handlers.CreateMapSummaryRequest": { | ||
| 1410 | "type": "object", | ||
| 1411 | "required": [ | ||
| 1412 | "category_id", | ||
| 1413 | "description", | ||
| 1414 | "record_date", | ||
| 1415 | "score_count", | ||
| 1416 | "user_name" | ||
| 1417 | ], | ||
| 1418 | "properties": { | ||
| 1419 | "category_id": { | ||
| 1420 | "type": "integer" | ||
| 1421 | }, | ||
| 1422 | "description": { | ||
| 1423 | "type": "string" | ||
| 1424 | }, | ||
| 1425 | "record_date": { | ||
| 1426 | "type": "string" | ||
| 1427 | }, | ||
| 1428 | "score_count": { | ||
| 1429 | "type": "integer" | ||
| 1430 | }, | ||
| 1431 | "showcase": { | ||
| 1432 | "type": "string" | ||
| 1433 | }, | ||
| 1434 | "user_name": { | ||
| 1435 | "type": "string" | ||
| 1436 | } | ||
| 1437 | } | ||
| 1438 | }, | ||
| 1439 | "handlers.DeleteMapSummaryRequest": { | ||
| 1440 | "type": "object", | ||
| 1441 | "required": [ | ||
| 1442 | "route_id" | ||
| 1443 | ], | ||
| 1444 | "properties": { | ||
| 1445 | "route_id": { | ||
| 1446 | "type": "integer" | ||
| 1447 | } | ||
| 1448 | } | ||
| 1449 | }, | ||
| 1450 | "handlers.EditMapDiscussionRequest": { | ||
| 1451 | "type": "object", | ||
| 1452 | "required": [ | ||
| 1453 | "content", | ||
| 1454 | "title" | ||
| 1455 | ], | ||
| 1456 | "properties": { | ||
| 1457 | "content": { | ||
| 1458 | "type": "string" | ||
| 1459 | }, | ||
| 1460 | "title": { | ||
| 1461 | "type": "string" | ||
| 1462 | } | ||
| 1463 | } | ||
| 1464 | }, | ||
| 1465 | "handlers.EditMapImageRequest": { | ||
| 1466 | "type": "object", | ||
| 1467 | "required": [ | ||
| 1468 | "image" | ||
| 1469 | ], | ||
| 1470 | "properties": { | ||
| 1471 | "image": { | ||
| 1472 | "type": "string" | ||
| 1473 | } | ||
| 1474 | } | ||
| 1475 | }, | ||
| 1476 | "handlers.EditMapSummaryRequest": { | ||
| 1477 | "type": "object", | ||
| 1478 | "required": [ | ||
| 1479 | "description", | ||
| 1480 | "record_date", | ||
| 1481 | "route_id", | ||
| 1482 | "score_count", | ||
| 1483 | "user_name" | ||
| 1484 | ], | ||
| 1485 | "properties": { | ||
| 1486 | "description": { | ||
| 1487 | "type": "string" | ||
| 1488 | }, | ||
| 1489 | "record_date": { | ||
| 1490 | "type": "string" | ||
| 1491 | }, | ||
| 1492 | "route_id": { | ||
| 1493 | "type": "integer" | ||
| 1494 | }, | ||
| 1495 | "score_count": { | ||
| 1496 | "type": "integer" | ||
| 1497 | }, | ||
| 1498 | "showcase": { | ||
| 1499 | "type": "string" | ||
| 1500 | }, | ||
| 1501 | "user_name": { | ||
| 1502 | "type": "string" | ||
| 1503 | } | ||
| 1504 | } | ||
| 1505 | }, | ||
| 1506 | "handlers.LoginResponse": { | ||
| 1507 | "type": "object", | ||
| 1508 | "properties": { | ||
| 1509 | "token": { | ||
| 1510 | "type": "string" | ||
| 1511 | } | ||
| 1512 | } | ||
| 1513 | }, | ||
| 1514 | "handlers.LogsResponse": { | ||
| 1515 | "type": "object", | ||
| 1516 | "properties": { | ||
| 1517 | "logs": { | ||
| 1518 | "type": "array", | ||
| 1519 | "items": { | ||
| 1520 | "$ref": "#/definitions/handlers.LogsResponseDetails" | ||
| 1521 | } | ||
| 1522 | } | ||
| 1523 | } | ||
| 1524 | }, | ||
| 1525 | "handlers.LogsResponseDetails": { | ||
| 1526 | "type": "object", | ||
| 1527 | "properties": { | ||
| 1528 | "date": { | ||
| 1529 | "type": "string" | ||
| 1530 | }, | ||
| 1531 | "detail": { | ||
| 1532 | "type": "string" | ||
| 1533 | }, | ||
| 1534 | "message": { | ||
| 1535 | "type": "string" | ||
| 1536 | }, | ||
| 1537 | "user": { | ||
| 1538 | "$ref": "#/definitions/models.UserShort" | ||
| 1539 | } | ||
| 1540 | } | ||
| 1541 | }, | ||
| 1542 | "handlers.MapDiscussion": { | ||
| 1543 | "type": "object", | ||
| 1544 | "properties": { | ||
| 1545 | "comments": { | ||
| 1546 | "type": "array", | ||
| 1547 | "items": { | ||
| 1548 | "$ref": "#/definitions/handlers.MapDiscussionComment" | ||
| 1549 | } | ||
| 1550 | }, | ||
| 1551 | "content": { | ||
| 1552 | "type": "string" | ||
| 1553 | }, | ||
| 1554 | "created_at": { | ||
| 1555 | "description": "Upvotes int `json:\"upvotes\"`", | ||
| 1556 | "type": "string" | ||
| 1557 | }, | ||
| 1558 | "creator": { | ||
| 1559 | "$ref": "#/definitions/models.UserShortWithAvatar" | ||
| 1560 | }, | ||
| 1561 | "id": { | ||
| 1562 | "type": "integer" | ||
| 1563 | }, | ||
| 1564 | "title": { | ||
| 1565 | "type": "string" | ||
| 1566 | }, | ||
| 1567 | "updated_at": { | ||
| 1568 | "type": "string" | ||
| 1569 | } | ||
| 1570 | } | ||
| 1571 | }, | ||
| 1572 | "handlers.MapDiscussionComment": { | ||
| 1573 | "type": "object", | ||
| 1574 | "properties": { | ||
| 1575 | "comment": { | ||
| 1576 | "type": "string" | ||
| 1577 | }, | ||
| 1578 | "date": { | ||
| 1579 | "type": "string" | ||
| 1580 | }, | ||
| 1581 | "user": { | ||
| 1582 | "$ref": "#/definitions/models.UserShortWithAvatar" | ||
| 1583 | } | ||
| 1584 | } | ||
| 1585 | }, | ||
| 1586 | "handlers.MapDiscussionResponse": { | ||
| 1587 | "type": "object", | ||
| 1588 | "properties": { | ||
| 1589 | "discussion": { | ||
| 1590 | "$ref": "#/definitions/handlers.MapDiscussion" | ||
| 1591 | } | ||
| 1592 | } | ||
| 1593 | }, | ||
| 1594 | "handlers.MapDiscussionsResponse": { | ||
| 1595 | "type": "object", | ||
| 1596 | "properties": { | ||
| 1597 | "discussions": { | ||
| 1598 | "type": "array", | ||
| 1599 | "items": { | ||
| 1600 | "$ref": "#/definitions/handlers.MapDiscussion" | ||
| 1601 | } | ||
| 1602 | } | ||
| 1603 | } | ||
| 1604 | }, | ||
| 1605 | "handlers.MapLeaderboardsResponse": { | ||
| 1606 | "type": "object", | ||
| 1607 | "properties": { | ||
| 1608 | "map": { | ||
| 1609 | "$ref": "#/definitions/models.Map" | ||
| 1610 | }, | ||
| 1611 | "pagination": { | ||
| 1612 | "$ref": "#/definitions/models.Pagination" | ||
| 1613 | }, | ||
| 1614 | "records": {} | ||
| 1615 | } | ||
| 1616 | }, | ||
| 1617 | "handlers.MapShortWithGame": { | ||
| 1618 | "type": "object", | ||
| 1619 | "properties": { | ||
| 1620 | "chapter": { | ||
| 1621 | "type": "string" | ||
| 1622 | }, | ||
| 1623 | "game": { | ||
| 1624 | "type": "string" | ||
| 1625 | }, | ||
| 1626 | "id": { | ||
| 1627 | "type": "integer" | ||
| 1628 | }, | ||
| 1629 | "map": { | ||
| 1630 | "type": "string" | ||
| 1631 | } | ||
| 1632 | } | ||
| 1633 | }, | ||
| 1634 | "handlers.MapSummaryResponse": { | ||
| 1635 | "type": "object", | ||
| 1636 | "properties": { | ||
| 1637 | "map": { | ||
| 1638 | "$ref": "#/definitions/models.Map" | ||
| 1639 | }, | ||
| 1640 | "summary": { | ||
| 1641 | "$ref": "#/definitions/models.MapSummary" | ||
| 1642 | } | ||
| 1643 | } | ||
| 1644 | }, | ||
| 1645 | "handlers.ProfileRankings": { | ||
| 1646 | "type": "object", | ||
| 1647 | "properties": { | ||
| 1648 | "cooperative": { | ||
| 1649 | "$ref": "#/definitions/handlers.ProfileRankingsDetails" | ||
| 1650 | }, | ||
| 1651 | "overall": { | ||
| 1652 | "$ref": "#/definitions/handlers.ProfileRankingsDetails" | ||
| 1653 | }, | ||
| 1654 | "singleplayer": { | ||
| 1655 | "$ref": "#/definitions/handlers.ProfileRankingsDetails" | ||
| 1656 | } | ||
| 1657 | } | ||
| 1658 | }, | ||
| 1659 | "handlers.ProfileRankingsDetails": { | ||
| 1660 | "type": "object", | ||
| 1661 | "properties": { | ||
| 1662 | "completion_count": { | ||
| 1663 | "type": "integer" | ||
| 1664 | }, | ||
| 1665 | "completion_total": { | ||
| 1666 | "type": "integer" | ||
| 1667 | }, | ||
| 1668 | "rank": { | ||
| 1669 | "type": "integer" | ||
| 1670 | } | ||
| 1671 | } | ||
| 1672 | }, | ||
| 1673 | "handlers.ProfileRecords": { | ||
| 1674 | "type": "object", | ||
| 1675 | "properties": { | ||
| 1676 | "category_id": { | ||
| 1677 | "type": "integer" | ||
| 1678 | }, | ||
| 1679 | "game_id": { | ||
| 1680 | "type": "integer" | ||
| 1681 | }, | ||
| 1682 | "map_id": { | ||
| 1683 | "type": "integer" | ||
| 1684 | }, | ||
| 1685 | "map_name": { | ||
| 1686 | "type": "string" | ||
| 1687 | }, | ||
| 1688 | "map_wr_count": { | ||
| 1689 | "type": "integer" | ||
| 1690 | }, | ||
| 1691 | "placement": { | ||
| 1692 | "type": "integer" | ||
| 1693 | }, | ||
| 1694 | "scores": { | ||
| 1695 | "type": "array", | ||
| 1696 | "items": { | ||
| 1697 | "$ref": "#/definitions/handlers.ProfileScores" | ||
| 1698 | } | ||
| 1699 | } | ||
| 1700 | } | ||
| 1701 | }, | ||
| 1702 | "handlers.ProfileResponse": { | ||
| 1703 | "type": "object", | ||
| 1704 | "properties": { | ||
| 1705 | "avatar_link": { | ||
| 1706 | "type": "string" | ||
| 1707 | }, | ||
| 1708 | "country_code": { | ||
| 1709 | "type": "string" | ||
| 1710 | }, | ||
| 1711 | "links": { | ||
| 1712 | "$ref": "#/definitions/models.Links" | ||
| 1713 | }, | ||
| 1714 | "pagination": { | ||
| 1715 | "$ref": "#/definitions/models.Pagination" | ||
| 1716 | }, | ||
| 1717 | "profile": { | ||
| 1718 | "type": "boolean" | ||
| 1719 | }, | ||
| 1720 | "rankings": { | ||
| 1721 | "$ref": "#/definitions/handlers.ProfileRankings" | ||
| 1722 | }, | ||
| 1723 | "records": { | ||
| 1724 | "type": "array", | ||
| 1725 | "items": { | ||
| 1726 | "$ref": "#/definitions/handlers.ProfileRecords" | ||
| 1727 | } | ||
| 1728 | }, | ||
| 1729 | "steam_id": { | ||
| 1730 | "type": "string" | ||
| 1731 | }, | ||
| 1732 | "titles": { | ||
| 1733 | "type": "array", | ||
| 1734 | "items": { | ||
| 1735 | "$ref": "#/definitions/models.Title" | ||
| 1736 | } | ||
| 1737 | }, | ||
| 1738 | "user_name": { | ||
| 1739 | "type": "string" | ||
| 1740 | } | ||
| 1741 | } | ||
| 1742 | }, | ||
| 1743 | "handlers.ProfileScores": { | ||
| 1744 | "type": "object", | ||
| 1745 | "properties": { | ||
| 1746 | "date": { | ||
| 1747 | "type": "string" | ||
| 1748 | }, | ||
| 1749 | "demo_id": { | ||
| 1750 | "type": "string" | ||
| 1751 | }, | ||
| 1752 | "record_id": { | ||
| 1753 | "type": "integer" | ||
| 1754 | }, | ||
| 1755 | "score_count": { | ||
| 1756 | "type": "integer" | ||
| 1757 | }, | ||
| 1758 | "score_time": { | ||
| 1759 | "type": "integer" | ||
| 1760 | } | ||
| 1761 | } | ||
| 1762 | }, | ||
| 1763 | "handlers.RankingsResponse": { | ||
| 1764 | "type": "object", | ||
| 1765 | "properties": { | ||
| 1766 | "rankings_multiplayer": { | ||
| 1767 | "type": "array", | ||
| 1768 | "items": { | ||
| 1769 | "$ref": "#/definitions/models.UserRanking" | ||
| 1770 | } | ||
| 1771 | }, | ||
| 1772 | "rankings_overall": { | ||
| 1773 | "type": "array", | ||
| 1774 | "items": { | ||
| 1775 | "$ref": "#/definitions/models.UserRanking" | ||
| 1776 | } | ||
| 1777 | }, | ||
| 1778 | "rankings_singleplayer": { | ||
| 1779 | "type": "array", | ||
| 1780 | "items": { | ||
| 1781 | "$ref": "#/definitions/models.UserRanking" | ||
| 1782 | } | ||
| 1783 | } | ||
| 1784 | } | ||
| 1785 | }, | ||
| 1786 | "handlers.RecordResponse": { | ||
| 1787 | "type": "object", | ||
| 1788 | "properties": { | ||
| 1789 | "score_count": { | ||
| 1790 | "type": "integer" | ||
| 1791 | }, | ||
| 1792 | "score_time": { | ||
| 1793 | "type": "integer" | ||
| 1794 | } | ||
| 1795 | } | ||
| 1796 | }, | ||
| 1797 | "handlers.ScoreLogsResponse": { | ||
| 1798 | "type": "object", | ||
| 1799 | "properties": { | ||
| 1800 | "scores": { | ||
| 1801 | "type": "array", | ||
| 1802 | "items": { | ||
| 1803 | "$ref": "#/definitions/handlers.ScoreLogsResponseDetails" | ||
| 1804 | } | ||
| 1805 | } | ||
| 1806 | } | ||
| 1807 | }, | ||
| 1808 | "handlers.ScoreLogsResponseDetails": { | ||
| 1809 | "type": "object", | ||
| 1810 | "properties": { | ||
| 1811 | "date": { | ||
| 1812 | "type": "string" | ||
| 1813 | }, | ||
| 1814 | "demo_id": { | ||
| 1815 | "type": "string" | ||
| 1816 | }, | ||
| 1817 | "game": { | ||
| 1818 | "$ref": "#/definitions/models.Game" | ||
| 1819 | }, | ||
| 1820 | "map": { | ||
| 1821 | "$ref": "#/definitions/models.MapShort" | ||
| 1822 | }, | ||
| 1823 | "score_count": { | ||
| 1824 | "type": "integer" | ||
| 1825 | }, | ||
| 1826 | "score_time": { | ||
| 1827 | "type": "integer" | ||
| 1828 | }, | ||
| 1829 | "user": { | ||
| 1830 | "$ref": "#/definitions/models.UserShort" | ||
| 1831 | } | ||
| 1832 | } | ||
| 1833 | }, | ||
| 1834 | "handlers.SearchResponse": { | ||
| 1835 | "type": "object", | ||
| 1836 | "properties": { | ||
| 1837 | "maps": { | ||
| 1838 | "type": "array", | ||
| 1839 | "items": { | ||
| 1840 | "$ref": "#/definitions/handlers.MapShortWithGame" | ||
| 1841 | } | ||
| 1842 | }, | ||
| 1843 | "players": { | ||
| 1844 | "type": "array", | ||
| 1845 | "items": { | ||
| 1846 | "$ref": "#/definitions/models.UserShortWithAvatar" | ||
| 1847 | } | ||
| 1848 | } | ||
| 1849 | } | ||
| 1850 | }, | ||
| 1851 | "models.Category": { | ||
| 1852 | "type": "object", | ||
| 1853 | "properties": { | ||
| 1854 | "id": { | ||
| 1855 | "type": "integer" | ||
| 1856 | }, | ||
| 1857 | "name": { | ||
| 1858 | "type": "string" | ||
| 1859 | } | ||
| 1860 | } | ||
| 1861 | }, | ||
| 1862 | "models.CategoryPortal": { | ||
| 1863 | "type": "object", | ||
| 1864 | "properties": { | ||
| 1865 | "category": { | ||
| 1866 | "$ref": "#/definitions/models.Category" | ||
| 1867 | }, | ||
| 1868 | "portal_count": { | ||
| 1869 | "type": "integer" | ||
| 1870 | } | ||
| 1871 | } | ||
| 1872 | }, | ||
| 1873 | "models.Chapter": { | ||
| 1874 | "type": "object", | ||
| 1875 | "properties": { | ||
| 1876 | "id": { | ||
| 1877 | "type": "integer" | ||
| 1878 | }, | ||
| 1879 | "image": { | ||
| 1880 | "type": "string" | ||
| 1881 | }, | ||
| 1882 | "is_disabled": { | ||
| 1883 | "type": "boolean" | ||
| 1884 | }, | ||
| 1885 | "name": { | ||
| 1886 | "type": "string" | ||
| 1887 | } | ||
| 1888 | } | ||
| 1889 | }, | ||
| 1890 | "models.Game": { | ||
| 1891 | "type": "object", | ||
| 1892 | "properties": { | ||
| 1893 | "category_portals": { | ||
| 1894 | "type": "array", | ||
| 1895 | "items": { | ||
| 1896 | "$ref": "#/definitions/models.CategoryPortal" | ||
| 1897 | } | ||
| 1898 | }, | ||
| 1899 | "id": { | ||
| 1900 | "type": "integer" | ||
| 1901 | }, | ||
| 1902 | "image": { | ||
| 1903 | "type": "string" | ||
| 1904 | }, | ||
| 1905 | "is_coop": { | ||
| 1906 | "type": "boolean" | ||
| 1907 | }, | ||
| 1908 | "name": { | ||
| 1909 | "type": "string" | ||
| 1910 | } | ||
| 1911 | } | ||
| 1912 | }, | ||
| 1913 | "models.Links": { | ||
| 1914 | "type": "object", | ||
| 1915 | "properties": { | ||
| 1916 | "p2sr": { | ||
| 1917 | "type": "string" | ||
| 1918 | }, | ||
| 1919 | "steam": { | ||
| 1920 | "type": "string" | ||
| 1921 | }, | ||
| 1922 | "twitch": { | ||
| 1923 | "type": "string" | ||
| 1924 | }, | ||
| 1925 | "youtube": { | ||
| 1926 | "type": "string" | ||
| 1927 | } | ||
| 1928 | } | ||
| 1929 | }, | ||
| 1930 | "models.Map": { | ||
| 1931 | "type": "object", | ||
| 1932 | "properties": { | ||
| 1933 | "chapter_name": { | ||
| 1934 | "type": "string" | ||
| 1935 | }, | ||
| 1936 | "game_name": { | ||
| 1937 | "type": "string" | ||
| 1938 | }, | ||
| 1939 | "id": { | ||
| 1940 | "type": "integer" | ||
| 1941 | }, | ||
| 1942 | "image": { | ||
| 1943 | "type": "string" | ||
| 1944 | }, | ||
| 1945 | "is_coop": { | ||
| 1946 | "type": "boolean" | ||
| 1947 | }, | ||
| 1948 | "is_disabled": { | ||
| 1949 | "type": "boolean" | ||
| 1950 | }, | ||
| 1951 | "map_name": { | ||
| 1952 | "type": "string" | ||
| 1953 | } | ||
| 1954 | } | ||
| 1955 | }, | ||
| 1956 | "models.MapHistory": { | ||
| 1957 | "type": "object", | ||
| 1958 | "properties": { | ||
| 1959 | "date": { | ||
| 1960 | "type": "string" | ||
| 1961 | }, | ||
| 1962 | "runner_name": { | ||
| 1963 | "type": "string" | ||
| 1964 | }, | ||
| 1965 | "score_count": { | ||
| 1966 | "type": "integer" | ||
| 1967 | } | ||
| 1968 | } | ||
| 1969 | }, | ||
| 1970 | "models.MapRoute": { | ||
| 1971 | "type": "object", | ||
| 1972 | "properties": { | ||
| 1973 | "category": { | ||
| 1974 | "$ref": "#/definitions/models.Category" | ||
| 1975 | }, | ||
| 1976 | "completion_count": { | ||
| 1977 | "type": "integer" | ||
| 1978 | }, | ||
| 1979 | "description": { | ||
| 1980 | "type": "string" | ||
| 1981 | }, | ||
| 1982 | "history": { | ||
| 1983 | "$ref": "#/definitions/models.MapHistory" | ||
| 1984 | }, | ||
| 1985 | "rating": { | ||
| 1986 | "type": "number" | ||
| 1987 | }, | ||
| 1988 | "route_id": { | ||
| 1989 | "type": "integer" | ||
| 1990 | }, | ||
| 1991 | "showcase": { | ||
| 1992 | "type": "string" | ||
| 1993 | } | ||
| 1994 | } | ||
| 1995 | }, | ||
| 1996 | "models.MapSelect": { | ||
| 1997 | "type": "object", | ||
| 1998 | "properties": { | ||
| 1999 | "category_portals": { | ||
| 2000 | "type": "array", | ||
| 2001 | "items": { | ||
| 2002 | "$ref": "#/definitions/models.CategoryPortal" | ||
| 2003 | } | ||
| 2004 | }, | ||
| 2005 | "difficulty": { | ||
| 2006 | "type": "integer" | ||
| 2007 | }, | ||
| 2008 | "id": { | ||
| 2009 | "type": "integer" | ||
| 2010 | }, | ||
| 2011 | "image": { | ||
| 2012 | "type": "string" | ||
| 2013 | }, | ||
| 2014 | "is_disabled": { | ||
| 2015 | "type": "boolean" | ||
| 2016 | }, | ||
| 2017 | "name": { | ||
| 2018 | "type": "string" | ||
| 2019 | } | ||
| 2020 | } | ||
| 2021 | }, | ||
| 2022 | "models.MapShort": { | ||
| 2023 | "type": "object", | ||
| 2024 | "properties": { | ||
| 2025 | "difficulty": { | ||
| 2026 | "type": "integer" | ||
| 2027 | }, | ||
| 2028 | "id": { | ||
| 2029 | "type": "integer" | ||
| 2030 | }, | ||
| 2031 | "image": { | ||
| 2032 | "type": "string" | ||
| 2033 | }, | ||
| 2034 | "is_disabled": { | ||
| 2035 | "type": "boolean" | ||
| 2036 | }, | ||
| 2037 | "name": { | ||
| 2038 | "type": "string" | ||
| 2039 | }, | ||
| 2040 | "portal_count": { | ||
| 2041 | "type": "integer" | ||
| 2042 | } | ||
| 2043 | } | ||
| 2044 | }, | ||
| 2045 | "models.MapSummary": { | ||
| 2046 | "type": "object", | ||
| 2047 | "properties": { | ||
| 2048 | "routes": { | ||
| 2049 | "type": "array", | ||
| 2050 | "items": { | ||
| 2051 | "$ref": "#/definitions/models.MapRoute" | ||
| 2052 | } | ||
| 2053 | } | ||
| 2054 | } | ||
| 2055 | }, | ||
| 2056 | "models.Pagination": { | ||
| 2057 | "type": "object", | ||
| 2058 | "properties": { | ||
| 2059 | "current_page": { | ||
| 2060 | "type": "integer" | ||
| 2061 | }, | ||
| 2062 | "page_size": { | ||
| 2063 | "type": "integer" | ||
| 2064 | }, | ||
| 2065 | "total_pages": { | ||
| 2066 | "type": "integer" | ||
| 2067 | }, | ||
| 2068 | "total_records": { | ||
| 2069 | "type": "integer" | ||
| 2070 | } | ||
| 2071 | } | ||
| 2072 | }, | ||
| 2073 | "models.Response": { | ||
| 2074 | "type": "object", | ||
| 2075 | "properties": { | ||
| 2076 | "data": {}, | ||
| 2077 | "message": { | ||
| 2078 | "type": "string" | ||
| 2079 | }, | ||
| 2080 | "success": { | ||
| 2081 | "type": "boolean" | ||
| 2082 | } | ||
| 2083 | } | ||
| 2084 | }, | ||
| 2085 | "models.Title": { | ||
| 2086 | "type": "object", | ||
| 2087 | "properties": { | ||
| 2088 | "color": { | ||
| 2089 | "type": "string" | ||
| 2090 | }, | ||
| 2091 | "name": { | ||
| 2092 | "type": "string" | ||
| 2093 | } | ||
| 2094 | } | ||
| 2095 | }, | ||
| 2096 | "models.UserRanking": { | ||
| 2097 | "type": "object", | ||
| 2098 | "properties": { | ||
| 2099 | "placement": { | ||
| 2100 | "type": "integer" | ||
| 2101 | }, | ||
| 2102 | "total_score": { | ||
| 2103 | "type": "integer" | ||
| 2104 | }, | ||
| 2105 | "user": { | ||
| 2106 | "$ref": "#/definitions/models.UserShortWithAvatar" | ||
| 2107 | } | ||
| 2108 | } | ||
| 2109 | }, | ||
| 2110 | "models.UserShort": { | ||
| 2111 | "type": "object", | ||
| 2112 | "properties": { | ||
| 2113 | "steam_id": { | ||
| 2114 | "type": "string" | ||
| 2115 | }, | ||
| 2116 | "user_name": { | ||
| 2117 | "type": "string" | ||
| 2118 | } | ||
| 2119 | } | ||
| 2120 | }, | ||
| 2121 | "models.UserShortWithAvatar": { | ||
| 2122 | "type": "object", | ||
| 2123 | "properties": { | ||
| 2124 | "avatar_link": { | ||
| 2125 | "type": "string" | ||
| 2126 | }, | ||
| 2127 | "steam_id": { | ||
| 2128 | "type": "string" | ||
| 2129 | }, | ||
| 2130 | "user_name": { | ||
| 2131 | "type": "string" | ||
| 2132 | } | ||
| 2133 | } | ||
| 2134 | } | ||
| 2135 | } | ||
| 2136 | } \ No newline at end of file | ||
diff --git a/backend/docs/swagger.yaml b/backend/docs/swagger.yaml new file mode 100644 index 0000000..853b3b9 --- /dev/null +++ b/backend/docs/swagger.yaml | |||
| @@ -0,0 +1,1324 @@ | |||
| 1 | basePath: /api/v1 | ||
| 2 | definitions: | ||
| 3 | handlers.ChapterMapsResponse: | ||
| 4 | properties: | ||
| 5 | chapter: | ||
| 6 | $ref: '#/definitions/models.Chapter' | ||
| 7 | maps: | ||
| 8 | items: | ||
| 9 | $ref: '#/definitions/models.MapSelect' | ||
| 10 | type: array | ||
| 11 | type: object | ||
| 12 | handlers.ChaptersResponse: | ||
| 13 | properties: | ||
| 14 | chapters: | ||
| 15 | items: | ||
| 16 | $ref: '#/definitions/models.Chapter' | ||
| 17 | type: array | ||
| 18 | game: | ||
| 19 | $ref: '#/definitions/models.Game' | ||
| 20 | type: object | ||
| 21 | handlers.CreateMapDiscussionCommentRequest: | ||
| 22 | properties: | ||
| 23 | comment: | ||
| 24 | type: string | ||
| 25 | required: | ||
| 26 | - comment | ||
| 27 | type: object | ||
| 28 | handlers.CreateMapDiscussionRequest: | ||
| 29 | properties: | ||
| 30 | content: | ||
| 31 | type: string | ||
| 32 | title: | ||
| 33 | type: string | ||
| 34 | required: | ||
| 35 | - content | ||
| 36 | - title | ||
| 37 | type: object | ||
| 38 | handlers.CreateMapSummaryRequest: | ||
| 39 | properties: | ||
| 40 | category_id: | ||
| 41 | type: integer | ||
| 42 | description: | ||
| 43 | type: string | ||
| 44 | record_date: | ||
| 45 | type: string | ||
| 46 | score_count: | ||
| 47 | type: integer | ||
| 48 | showcase: | ||
| 49 | type: string | ||
| 50 | user_name: | ||
| 51 | type: string | ||
| 52 | required: | ||
| 53 | - category_id | ||
| 54 | - description | ||
| 55 | - record_date | ||
| 56 | - score_count | ||
| 57 | - user_name | ||
| 58 | type: object | ||
| 59 | handlers.DeleteMapSummaryRequest: | ||
| 60 | properties: | ||
| 61 | route_id: | ||
| 62 | type: integer | ||
| 63 | required: | ||
| 64 | - route_id | ||
| 65 | type: object | ||
| 66 | handlers.EditMapDiscussionRequest: | ||
| 67 | properties: | ||
| 68 | content: | ||
| 69 | type: string | ||
| 70 | title: | ||
| 71 | type: string | ||
| 72 | required: | ||
| 73 | - content | ||
| 74 | - title | ||
| 75 | type: object | ||
| 76 | handlers.EditMapImageRequest: | ||
| 77 | properties: | ||
| 78 | image: | ||
| 79 | type: string | ||
| 80 | required: | ||
| 81 | - image | ||
| 82 | type: object | ||
| 83 | handlers.EditMapSummaryRequest: | ||
| 84 | properties: | ||
| 85 | description: | ||
| 86 | type: string | ||
| 87 | record_date: | ||
| 88 | type: string | ||
| 89 | route_id: | ||
| 90 | type: integer | ||
| 91 | score_count: | ||
| 92 | type: integer | ||
| 93 | showcase: | ||
| 94 | type: string | ||
| 95 | user_name: | ||
| 96 | type: string | ||
| 97 | required: | ||
| 98 | - description | ||
| 99 | - record_date | ||
| 100 | - route_id | ||
| 101 | - score_count | ||
| 102 | - user_name | ||
| 103 | type: object | ||
| 104 | handlers.LoginResponse: | ||
| 105 | properties: | ||
| 106 | token: | ||
| 107 | type: string | ||
| 108 | type: object | ||
| 109 | handlers.LogsResponse: | ||
| 110 | properties: | ||
| 111 | logs: | ||
| 112 | items: | ||
| 113 | $ref: '#/definitions/handlers.LogsResponseDetails' | ||
| 114 | type: array | ||
| 115 | type: object | ||
| 116 | handlers.LogsResponseDetails: | ||
| 117 | properties: | ||
| 118 | date: | ||
| 119 | type: string | ||
| 120 | detail: | ||
| 121 | type: string | ||
| 122 | message: | ||
| 123 | type: string | ||
| 124 | user: | ||
| 125 | $ref: '#/definitions/models.UserShort' | ||
| 126 | type: object | ||
| 127 | handlers.MapDiscussion: | ||
| 128 | properties: | ||
| 129 | comments: | ||
| 130 | items: | ||
| 131 | $ref: '#/definitions/handlers.MapDiscussionComment' | ||
| 132 | type: array | ||
| 133 | content: | ||
| 134 | type: string | ||
| 135 | created_at: | ||
| 136 | description: Upvotes int `json:"upvotes"` | ||
| 137 | type: string | ||
| 138 | creator: | ||
| 139 | $ref: '#/definitions/models.UserShortWithAvatar' | ||
| 140 | id: | ||
| 141 | type: integer | ||
| 142 | title: | ||
| 143 | type: string | ||
| 144 | updated_at: | ||
| 145 | type: string | ||
| 146 | type: object | ||
| 147 | handlers.MapDiscussionComment: | ||
| 148 | properties: | ||
| 149 | comment: | ||
| 150 | type: string | ||
| 151 | date: | ||
| 152 | type: string | ||
| 153 | user: | ||
| 154 | $ref: '#/definitions/models.UserShortWithAvatar' | ||
| 155 | type: object | ||
| 156 | handlers.MapDiscussionResponse: | ||
| 157 | properties: | ||
| 158 | discussion: | ||
| 159 | $ref: '#/definitions/handlers.MapDiscussion' | ||
| 160 | type: object | ||
| 161 | handlers.MapDiscussionsResponse: | ||
| 162 | properties: | ||
| 163 | discussions: | ||
| 164 | items: | ||
| 165 | $ref: '#/definitions/handlers.MapDiscussion' | ||
| 166 | type: array | ||
| 167 | type: object | ||
| 168 | handlers.MapLeaderboardsResponse: | ||
| 169 | properties: | ||
| 170 | map: | ||
| 171 | $ref: '#/definitions/models.Map' | ||
| 172 | pagination: | ||
| 173 | $ref: '#/definitions/models.Pagination' | ||
| 174 | records: {} | ||
| 175 | type: object | ||
| 176 | handlers.MapShortWithGame: | ||
| 177 | properties: | ||
| 178 | chapter: | ||
| 179 | type: string | ||
| 180 | game: | ||
| 181 | type: string | ||
| 182 | id: | ||
| 183 | type: integer | ||
| 184 | map: | ||
| 185 | type: string | ||
| 186 | type: object | ||
| 187 | handlers.MapSummaryResponse: | ||
| 188 | properties: | ||
| 189 | map: | ||
| 190 | $ref: '#/definitions/models.Map' | ||
| 191 | summary: | ||
| 192 | $ref: '#/definitions/models.MapSummary' | ||
| 193 | type: object | ||
| 194 | handlers.ProfileRankings: | ||
| 195 | properties: | ||
| 196 | cooperative: | ||
| 197 | $ref: '#/definitions/handlers.ProfileRankingsDetails' | ||
| 198 | overall: | ||
| 199 | $ref: '#/definitions/handlers.ProfileRankingsDetails' | ||
| 200 | singleplayer: | ||
| 201 | $ref: '#/definitions/handlers.ProfileRankingsDetails' | ||
| 202 | type: object | ||
| 203 | handlers.ProfileRankingsDetails: | ||
| 204 | properties: | ||
| 205 | completion_count: | ||
| 206 | type: integer | ||
| 207 | completion_total: | ||
| 208 | type: integer | ||
| 209 | rank: | ||
| 210 | type: integer | ||
| 211 | type: object | ||
| 212 | handlers.ProfileRecords: | ||
| 213 | properties: | ||
| 214 | category_id: | ||
| 215 | type: integer | ||
| 216 | game_id: | ||
| 217 | type: integer | ||
| 218 | map_id: | ||
| 219 | type: integer | ||
| 220 | map_name: | ||
| 221 | type: string | ||
| 222 | map_wr_count: | ||
| 223 | type: integer | ||
| 224 | placement: | ||
| 225 | type: integer | ||
| 226 | scores: | ||
| 227 | items: | ||
| 228 | $ref: '#/definitions/handlers.ProfileScores' | ||
| 229 | type: array | ||
| 230 | type: object | ||
| 231 | handlers.ProfileResponse: | ||
| 232 | properties: | ||
| 233 | avatar_link: | ||
| 234 | type: string | ||
| 235 | country_code: | ||
| 236 | type: string | ||
| 237 | links: | ||
| 238 | $ref: '#/definitions/models.Links' | ||
| 239 | pagination: | ||
| 240 | $ref: '#/definitions/models.Pagination' | ||
| 241 | profile: | ||
| 242 | type: boolean | ||
| 243 | rankings: | ||
| 244 | $ref: '#/definitions/handlers.ProfileRankings' | ||
| 245 | records: | ||
| 246 | items: | ||
| 247 | $ref: '#/definitions/handlers.ProfileRecords' | ||
| 248 | type: array | ||
| 249 | steam_id: | ||
| 250 | type: string | ||
| 251 | titles: | ||
| 252 | items: | ||
| 253 | $ref: '#/definitions/models.Title' | ||
| 254 | type: array | ||
| 255 | user_name: | ||
| 256 | type: string | ||
| 257 | type: object | ||
| 258 | handlers.ProfileScores: | ||
| 259 | properties: | ||
| 260 | date: | ||
| 261 | type: string | ||
| 262 | demo_id: | ||
| 263 | type: string | ||
| 264 | record_id: | ||
| 265 | type: integer | ||
| 266 | score_count: | ||
| 267 | type: integer | ||
| 268 | score_time: | ||
| 269 | type: integer | ||
| 270 | type: object | ||
| 271 | handlers.RankingsResponse: | ||
| 272 | properties: | ||
| 273 | rankings_multiplayer: | ||
| 274 | items: | ||
| 275 | $ref: '#/definitions/models.UserRanking' | ||
| 276 | type: array | ||
| 277 | rankings_overall: | ||
| 278 | items: | ||
| 279 | $ref: '#/definitions/models.UserRanking' | ||
| 280 | type: array | ||
| 281 | rankings_singleplayer: | ||
| 282 | items: | ||
| 283 | $ref: '#/definitions/models.UserRanking' | ||
| 284 | type: array | ||
| 285 | type: object | ||
| 286 | handlers.RecordResponse: | ||
| 287 | properties: | ||
| 288 | score_count: | ||
| 289 | type: integer | ||
| 290 | score_time: | ||
| 291 | type: integer | ||
| 292 | type: object | ||
| 293 | handlers.ScoreLogsResponse: | ||
| 294 | properties: | ||
| 295 | scores: | ||
| 296 | items: | ||
| 297 | $ref: '#/definitions/handlers.ScoreLogsResponseDetails' | ||
| 298 | type: array | ||
| 299 | type: object | ||
| 300 | handlers.ScoreLogsResponseDetails: | ||
| 301 | properties: | ||
| 302 | date: | ||
| 303 | type: string | ||
| 304 | demo_id: | ||
| 305 | type: string | ||
| 306 | game: | ||
| 307 | $ref: '#/definitions/models.Game' | ||
| 308 | map: | ||
| 309 | $ref: '#/definitions/models.MapShort' | ||
| 310 | score_count: | ||
| 311 | type: integer | ||
| 312 | score_time: | ||
| 313 | type: integer | ||
| 314 | user: | ||
| 315 | $ref: '#/definitions/models.UserShort' | ||
| 316 | type: object | ||
| 317 | handlers.SearchResponse: | ||
| 318 | properties: | ||
| 319 | maps: | ||
| 320 | items: | ||
| 321 | $ref: '#/definitions/handlers.MapShortWithGame' | ||
| 322 | type: array | ||
| 323 | players: | ||
| 324 | items: | ||
| 325 | $ref: '#/definitions/models.UserShortWithAvatar' | ||
| 326 | type: array | ||
| 327 | type: object | ||
| 328 | models.Category: | ||
| 329 | properties: | ||
| 330 | id: | ||
| 331 | type: integer | ||
| 332 | name: | ||
| 333 | type: string | ||
| 334 | type: object | ||
| 335 | models.CategoryPortal: | ||
| 336 | properties: | ||
| 337 | category: | ||
| 338 | $ref: '#/definitions/models.Category' | ||
| 339 | portal_count: | ||
| 340 | type: integer | ||
| 341 | type: object | ||
| 342 | models.Chapter: | ||
| 343 | properties: | ||
| 344 | id: | ||
| 345 | type: integer | ||
| 346 | image: | ||
| 347 | type: string | ||
| 348 | is_disabled: | ||
| 349 | type: boolean | ||
| 350 | name: | ||
| 351 | type: string | ||
| 352 | type: object | ||
| 353 | models.Game: | ||
| 354 | properties: | ||
| 355 | category_portals: | ||
| 356 | items: | ||
| 357 | $ref: '#/definitions/models.CategoryPortal' | ||
| 358 | type: array | ||
| 359 | id: | ||
| 360 | type: integer | ||
| 361 | image: | ||
| 362 | type: string | ||
| 363 | is_coop: | ||
| 364 | type: boolean | ||
| 365 | name: | ||
| 366 | type: string | ||
| 367 | type: object | ||
| 368 | models.Links: | ||
| 369 | properties: | ||
| 370 | p2sr: | ||
| 371 | type: string | ||
| 372 | steam: | ||
| 373 | type: string | ||
| 374 | twitch: | ||
| 375 | type: string | ||
| 376 | youtube: | ||
| 377 | type: string | ||
| 378 | type: object | ||
| 379 | models.Map: | ||
| 380 | properties: | ||
| 381 | chapter_name: | ||
| 382 | type: string | ||
| 383 | game_name: | ||
| 384 | type: string | ||
| 385 | id: | ||
| 386 | type: integer | ||
| 387 | image: | ||
| 388 | type: string | ||
| 389 | is_coop: | ||
| 390 | type: boolean | ||
| 391 | is_disabled: | ||
| 392 | type: boolean | ||
| 393 | map_name: | ||
| 394 | type: string | ||
| 395 | type: object | ||
| 396 | models.MapHistory: | ||
| 397 | properties: | ||
| 398 | date: | ||
| 399 | type: string | ||
| 400 | runner_name: | ||
| 401 | type: string | ||
| 402 | score_count: | ||
| 403 | type: integer | ||
| 404 | type: object | ||
| 405 | models.MapRoute: | ||
| 406 | properties: | ||
| 407 | category: | ||
| 408 | $ref: '#/definitions/models.Category' | ||
| 409 | completion_count: | ||
| 410 | type: integer | ||
| 411 | description: | ||
| 412 | type: string | ||
| 413 | history: | ||
| 414 | $ref: '#/definitions/models.MapHistory' | ||
| 415 | rating: | ||
| 416 | type: number | ||
| 417 | route_id: | ||
| 418 | type: integer | ||
| 419 | showcase: | ||
| 420 | type: string | ||
| 421 | type: object | ||
| 422 | models.MapSelect: | ||
| 423 | properties: | ||
| 424 | category_portals: | ||
| 425 | items: | ||
| 426 | $ref: '#/definitions/models.CategoryPortal' | ||
| 427 | type: array | ||
| 428 | difficulty: | ||
| 429 | type: integer | ||
| 430 | id: | ||
| 431 | type: integer | ||
| 432 | image: | ||
| 433 | type: string | ||
| 434 | is_disabled: | ||
| 435 | type: boolean | ||
| 436 | name: | ||
| 437 | type: string | ||
| 438 | type: object | ||
| 439 | models.MapShort: | ||
| 440 | properties: | ||
| 441 | difficulty: | ||
| 442 | type: integer | ||
| 443 | id: | ||
| 444 | type: integer | ||
| 445 | image: | ||
| 446 | type: string | ||
| 447 | is_disabled: | ||
| 448 | type: boolean | ||
| 449 | name: | ||
| 450 | type: string | ||
| 451 | portal_count: | ||
| 452 | type: integer | ||
| 453 | type: object | ||
| 454 | models.MapSummary: | ||
| 455 | properties: | ||
| 456 | routes: | ||
| 457 | items: | ||
| 458 | $ref: '#/definitions/models.MapRoute' | ||
| 459 | type: array | ||
| 460 | type: object | ||
| 461 | models.Pagination: | ||
| 462 | properties: | ||
| 463 | current_page: | ||
| 464 | type: integer | ||
| 465 | page_size: | ||
| 466 | type: integer | ||
| 467 | total_pages: | ||
| 468 | type: integer | ||
| 469 | total_records: | ||
| 470 | type: integer | ||
| 471 | type: object | ||
| 472 | models.Response: | ||
| 473 | properties: | ||
| 474 | data: {} | ||
| 475 | message: | ||
| 476 | type: string | ||
| 477 | success: | ||
| 478 | type: boolean | ||
| 479 | type: object | ||
| 480 | models.Title: | ||
| 481 | properties: | ||
| 482 | color: | ||
| 483 | type: string | ||
| 484 | name: | ||
| 485 | type: string | ||
| 486 | type: object | ||
| 487 | models.UserRanking: | ||
| 488 | properties: | ||
| 489 | placement: | ||
| 490 | type: integer | ||
| 491 | total_score: | ||
| 492 | type: integer | ||
| 493 | user: | ||
| 494 | $ref: '#/definitions/models.UserShortWithAvatar' | ||
| 495 | type: object | ||
| 496 | models.UserShort: | ||
| 497 | properties: | ||
| 498 | steam_id: | ||
| 499 | type: string | ||
| 500 | user_name: | ||
| 501 | type: string | ||
| 502 | type: object | ||
| 503 | models.UserShortWithAvatar: | ||
| 504 | properties: | ||
| 505 | avatar_link: | ||
| 506 | type: string | ||
| 507 | steam_id: | ||
| 508 | type: string | ||
| 509 | user_name: | ||
| 510 | type: string | ||
| 511 | type: object | ||
| 512 | host: lp.ardapektezol.com | ||
| 513 | info: | ||
| 514 | contact: {} | ||
| 515 | description: Backend API endpoints for the Least Portals Database. | ||
| 516 | license: | ||
| 517 | name: GNU Affero General Public License, Version 3 | ||
| 518 | url: https://www.gnu.org/licenses/agpl-3.0.html | ||
| 519 | title: Least Portals Database API | ||
| 520 | version: "1.0" | ||
| 521 | paths: | ||
| 522 | /chapters/{chapterid}: | ||
| 523 | get: | ||
| 524 | description: Get maps from the specified chapter id. | ||
| 525 | parameters: | ||
| 526 | - description: Chapter ID | ||
| 527 | in: path | ||
| 528 | name: chapterid | ||
| 529 | required: true | ||
| 530 | type: integer | ||
| 531 | produces: | ||
| 532 | - application/json | ||
| 533 | responses: | ||
| 534 | "200": | ||
| 535 | description: OK | ||
| 536 | schema: | ||
| 537 | allOf: | ||
| 538 | - $ref: '#/definitions/models.Response' | ||
| 539 | - properties: | ||
| 540 | data: | ||
| 541 | $ref: '#/definitions/handlers.ChapterMapsResponse' | ||
| 542 | type: object | ||
| 543 | "400": | ||
| 544 | description: Bad Request | ||
| 545 | schema: | ||
| 546 | $ref: '#/definitions/models.Response' | ||
| 547 | tags: | ||
| 548 | - games & chapters | ||
| 549 | /demos: | ||
| 550 | get: | ||
| 551 | consumes: | ||
| 552 | - application/json | ||
| 553 | description: Get demo with specified demo uuid. | ||
| 554 | parameters: | ||
| 555 | - description: Demo UUID | ||
| 556 | in: query | ||
| 557 | name: uuid | ||
| 558 | required: true | ||
| 559 | type: string | ||
| 560 | produces: | ||
| 561 | - application/octet-stream | ||
| 562 | responses: | ||
| 563 | "200": | ||
| 564 | description: Demo File | ||
| 565 | schema: | ||
| 566 | type: file | ||
| 567 | tags: | ||
| 568 | - demo | ||
| 569 | /games: | ||
| 570 | get: | ||
| 571 | description: Get games from the leaderboards. | ||
| 572 | produces: | ||
| 573 | - application/json | ||
| 574 | responses: | ||
| 575 | "200": | ||
| 576 | description: OK | ||
| 577 | schema: | ||
| 578 | allOf: | ||
| 579 | - $ref: '#/definitions/models.Response' | ||
| 580 | - properties: | ||
| 581 | data: | ||
| 582 | items: | ||
| 583 | $ref: '#/definitions/models.Game' | ||
| 584 | type: array | ||
| 585 | type: object | ||
| 586 | "400": | ||
| 587 | description: Bad Request | ||
| 588 | schema: | ||
| 589 | $ref: '#/definitions/models.Response' | ||
| 590 | tags: | ||
| 591 | - games & chapters | ||
| 592 | /games/{gameid}: | ||
| 593 | get: | ||
| 594 | description: Get chapters from the specified game id. | ||
| 595 | parameters: | ||
| 596 | - description: Game ID | ||
| 597 | in: path | ||
| 598 | name: gameid | ||
| 599 | required: true | ||
| 600 | type: integer | ||
| 601 | produces: | ||
| 602 | - application/json | ||
| 603 | responses: | ||
| 604 | "200": | ||
| 605 | description: OK | ||
| 606 | schema: | ||
| 607 | allOf: | ||
| 608 | - $ref: '#/definitions/models.Response' | ||
| 609 | - properties: | ||
| 610 | data: | ||
| 611 | $ref: '#/definitions/handlers.ChaptersResponse' | ||
| 612 | type: object | ||
| 613 | tags: | ||
| 614 | - games & chapters | ||
| 615 | /games/{gameid}/maps: | ||
| 616 | get: | ||
| 617 | description: Get maps from the specified game id. | ||
| 618 | parameters: | ||
| 619 | - description: Game ID | ||
| 620 | in: path | ||
| 621 | name: gameid | ||
| 622 | required: true | ||
| 623 | type: integer | ||
| 624 | produces: | ||
| 625 | - application/json | ||
| 626 | responses: | ||
| 627 | "200": | ||
| 628 | description: OK | ||
| 629 | schema: | ||
| 630 | allOf: | ||
| 631 | - $ref: '#/definitions/models.Response' | ||
| 632 | - properties: | ||
| 633 | data: | ||
| 634 | $ref: '#/definitions/handlers.ChaptersResponse' | ||
| 635 | type: object | ||
| 636 | tags: | ||
| 637 | - games & chapters | ||
| 638 | /login: | ||
| 639 | get: | ||
| 640 | consumes: | ||
| 641 | - application/json | ||
| 642 | description: Get (redirect) login page for Steam auth. | ||
| 643 | produces: | ||
| 644 | - application/json | ||
| 645 | responses: | ||
| 646 | "200": | ||
| 647 | description: OK | ||
| 648 | schema: | ||
| 649 | allOf: | ||
| 650 | - $ref: '#/definitions/models.Response' | ||
| 651 | - properties: | ||
| 652 | data: | ||
| 653 | $ref: '#/definitions/handlers.LoginResponse' | ||
| 654 | type: object | ||
| 655 | tags: | ||
| 656 | - login | ||
| 657 | /logs/mod: | ||
| 658 | get: | ||
| 659 | description: Get mod logs. | ||
| 660 | parameters: | ||
| 661 | - description: JWT Token | ||
| 662 | in: header | ||
| 663 | name: Authorization | ||
| 664 | required: true | ||
| 665 | type: string | ||
| 666 | produces: | ||
| 667 | - application/json | ||
| 668 | responses: | ||
| 669 | "200": | ||
| 670 | description: OK | ||
| 671 | schema: | ||
| 672 | allOf: | ||
| 673 | - $ref: '#/definitions/models.Response' | ||
| 674 | - properties: | ||
| 675 | data: | ||
| 676 | $ref: '#/definitions/handlers.LogsResponse' | ||
| 677 | type: object | ||
| 678 | tags: | ||
| 679 | - logs | ||
| 680 | /logs/score: | ||
| 681 | get: | ||
| 682 | description: Get score logs of every player. | ||
| 683 | produces: | ||
| 684 | - application/json | ||
| 685 | responses: | ||
| 686 | "200": | ||
| 687 | description: OK | ||
| 688 | schema: | ||
| 689 | allOf: | ||
| 690 | - $ref: '#/definitions/models.Response' | ||
| 691 | - properties: | ||
| 692 | data: | ||
| 693 | $ref: '#/definitions/handlers.ScoreLogsResponse' | ||
| 694 | type: object | ||
| 695 | tags: | ||
| 696 | - logs | ||
| 697 | /maps/{mapid}/discussions: | ||
| 698 | get: | ||
| 699 | description: Get map discussions with specified map id. | ||
| 700 | parameters: | ||
| 701 | - description: Map ID | ||
| 702 | in: path | ||
| 703 | name: mapid | ||
| 704 | required: true | ||
| 705 | type: integer | ||
| 706 | produces: | ||
| 707 | - application/json | ||
| 708 | responses: | ||
| 709 | "200": | ||
| 710 | description: OK | ||
| 711 | schema: | ||
| 712 | allOf: | ||
| 713 | - $ref: '#/definitions/models.Response' | ||
| 714 | - properties: | ||
| 715 | data: | ||
| 716 | $ref: '#/definitions/handlers.MapDiscussionsResponse' | ||
| 717 | type: object | ||
| 718 | tags: | ||
| 719 | - maps / discussions | ||
| 720 | post: | ||
| 721 | description: Create map discussion with specified map id. | ||
| 722 | parameters: | ||
| 723 | - description: JWT Token | ||
| 724 | in: header | ||
| 725 | name: Authorization | ||
| 726 | required: true | ||
| 727 | type: string | ||
| 728 | - description: Map ID | ||
| 729 | in: path | ||
| 730 | name: mapid | ||
| 731 | required: true | ||
| 732 | type: integer | ||
| 733 | - description: Body | ||
| 734 | in: body | ||
| 735 | name: request | ||
| 736 | required: true | ||
| 737 | schema: | ||
| 738 | $ref: '#/definitions/handlers.CreateMapDiscussionRequest' | ||
| 739 | produces: | ||
| 740 | - application/json | ||
| 741 | responses: | ||
| 742 | "200": | ||
| 743 | description: OK | ||
| 744 | schema: | ||
| 745 | allOf: | ||
| 746 | - $ref: '#/definitions/models.Response' | ||
| 747 | - properties: | ||
| 748 | data: | ||
| 749 | $ref: '#/definitions/handlers.CreateMapDiscussionRequest' | ||
| 750 | type: object | ||
| 751 | tags: | ||
| 752 | - maps / discussions | ||
| 753 | /maps/{mapid}/discussions/{discussionid}: | ||
| 754 | delete: | ||
| 755 | description: Delete map discussion with specified map id. | ||
| 756 | parameters: | ||
| 757 | - description: JWT Token | ||
| 758 | in: header | ||
| 759 | name: Authorization | ||
| 760 | required: true | ||
| 761 | type: string | ||
| 762 | - description: Map ID | ||
| 763 | in: path | ||
| 764 | name: mapid | ||
| 765 | required: true | ||
| 766 | type: integer | ||
| 767 | - description: Discussion ID | ||
| 768 | in: path | ||
| 769 | name: discussionid | ||
| 770 | required: true | ||
| 771 | type: integer | ||
| 772 | produces: | ||
| 773 | - application/json | ||
| 774 | responses: | ||
| 775 | "200": | ||
| 776 | description: OK | ||
| 777 | schema: | ||
| 778 | $ref: '#/definitions/models.Response' | ||
| 779 | tags: | ||
| 780 | - maps / discussions | ||
| 781 | get: | ||
| 782 | description: Get map discussion with specified map and discussion id. | ||
| 783 | parameters: | ||
| 784 | - description: Map ID | ||
| 785 | in: path | ||
| 786 | name: mapid | ||
| 787 | required: true | ||
| 788 | type: integer | ||
| 789 | - description: Discussion ID | ||
| 790 | in: path | ||
| 791 | name: discussionid | ||
| 792 | required: true | ||
| 793 | type: integer | ||
| 794 | produces: | ||
| 795 | - application/json | ||
| 796 | responses: | ||
| 797 | "200": | ||
| 798 | description: OK | ||
| 799 | schema: | ||
| 800 | allOf: | ||
| 801 | - $ref: '#/definitions/models.Response' | ||
| 802 | - properties: | ||
| 803 | data: | ||
| 804 | $ref: '#/definitions/handlers.MapDiscussionResponse' | ||
| 805 | type: object | ||
| 806 | tags: | ||
| 807 | - maps / discussions | ||
| 808 | post: | ||
| 809 | description: Create map discussion comment with specified map id. | ||
| 810 | parameters: | ||
| 811 | - description: JWT Token | ||
| 812 | in: header | ||
| 813 | name: Authorization | ||
| 814 | required: true | ||
| 815 | type: string | ||
| 816 | - description: Map ID | ||
| 817 | in: path | ||
| 818 | name: mapid | ||
| 819 | required: true | ||
| 820 | type: integer | ||
| 821 | - description: Discussion ID | ||
| 822 | in: path | ||
| 823 | name: discussionid | ||
| 824 | required: true | ||
| 825 | type: integer | ||
| 826 | - description: Body | ||
| 827 | in: body | ||
| 828 | name: request | ||
| 829 | required: true | ||
| 830 | schema: | ||
| 831 | $ref: '#/definitions/handlers.CreateMapDiscussionCommentRequest' | ||
| 832 | produces: | ||
| 833 | - application/json | ||
| 834 | responses: | ||
| 835 | "200": | ||
| 836 | description: OK | ||
| 837 | schema: | ||
| 838 | allOf: | ||
| 839 | - $ref: '#/definitions/models.Response' | ||
| 840 | - properties: | ||
| 841 | data: | ||
| 842 | $ref: '#/definitions/handlers.CreateMapDiscussionCommentRequest' | ||
| 843 | type: object | ||
| 844 | tags: | ||
| 845 | - maps / discussions | ||
| 846 | put: | ||
| 847 | description: Edit map discussion with specified map id. | ||
| 848 | parameters: | ||
| 849 | - description: JWT Token | ||
| 850 | in: header | ||
| 851 | name: Authorization | ||
| 852 | required: true | ||
| 853 | type: string | ||
| 854 | - description: Map ID | ||
| 855 | in: path | ||
| 856 | name: mapid | ||
| 857 | required: true | ||
| 858 | type: integer | ||
| 859 | - description: Discussion ID | ||
| 860 | in: path | ||
| 861 | name: discussionid | ||
| 862 | required: true | ||
| 863 | type: integer | ||
| 864 | - description: Body | ||
| 865 | in: body | ||
| 866 | name: request | ||
| 867 | required: true | ||
| 868 | schema: | ||
| 869 | $ref: '#/definitions/handlers.EditMapDiscussionRequest' | ||
| 870 | produces: | ||
| 871 | - application/json | ||
| 872 | responses: | ||
| 873 | "200": | ||
| 874 | description: OK | ||
| 875 | schema: | ||
| 876 | allOf: | ||
| 877 | - $ref: '#/definitions/models.Response' | ||
| 878 | - properties: | ||
| 879 | data: | ||
| 880 | $ref: '#/definitions/handlers.EditMapDiscussionRequest' | ||
| 881 | type: object | ||
| 882 | tags: | ||
| 883 | - maps / discussions | ||
| 884 | /maps/{mapid}/image: | ||
| 885 | put: | ||
| 886 | description: Edit map image with specified map id. | ||
| 887 | parameters: | ||
| 888 | - description: JWT Token | ||
| 889 | in: header | ||
| 890 | name: Authorization | ||
| 891 | required: true | ||
| 892 | type: string | ||
| 893 | - description: Map ID | ||
| 894 | in: path | ||
| 895 | name: mapid | ||
| 896 | required: true | ||
| 897 | type: integer | ||
| 898 | - description: Body | ||
| 899 | in: body | ||
| 900 | name: request | ||
| 901 | required: true | ||
| 902 | schema: | ||
| 903 | $ref: '#/definitions/handlers.EditMapImageRequest' | ||
| 904 | produces: | ||
| 905 | - application/json | ||
| 906 | responses: | ||
| 907 | "200": | ||
| 908 | description: OK | ||
| 909 | schema: | ||
| 910 | allOf: | ||
| 911 | - $ref: '#/definitions/models.Response' | ||
| 912 | - properties: | ||
| 913 | data: | ||
| 914 | $ref: '#/definitions/handlers.EditMapImageRequest' | ||
| 915 | type: object | ||
| 916 | tags: | ||
| 917 | - maps / summary | ||
| 918 | /maps/{mapid}/leaderboards: | ||
| 919 | get: | ||
| 920 | description: Get map leaderboards with specified id. | ||
| 921 | parameters: | ||
| 922 | - description: Map ID | ||
| 923 | in: path | ||
| 924 | name: mapid | ||
| 925 | required: true | ||
| 926 | type: integer | ||
| 927 | - description: 'Page Number (default: 1)' | ||
| 928 | in: query | ||
| 929 | name: page | ||
| 930 | type: integer | ||
| 931 | - description: 'Number of Records Per Page (default: 20)' | ||
| 932 | in: query | ||
| 933 | name: pageSize | ||
| 934 | type: integer | ||
| 935 | produces: | ||
| 936 | - application/json | ||
| 937 | responses: | ||
| 938 | "200": | ||
| 939 | description: OK | ||
| 940 | schema: | ||
| 941 | allOf: | ||
| 942 | - $ref: '#/definitions/models.Response' | ||
| 943 | - properties: | ||
| 944 | data: | ||
| 945 | $ref: '#/definitions/handlers.MapLeaderboardsResponse' | ||
| 946 | type: object | ||
| 947 | tags: | ||
| 948 | - maps / leaderboards | ||
| 949 | /maps/{mapid}/record: | ||
| 950 | post: | ||
| 951 | consumes: | ||
| 952 | - multipart/form-data | ||
| 953 | description: Post record with demo of a specific map. | ||
| 954 | parameters: | ||
| 955 | - description: Map ID | ||
| 956 | in: path | ||
| 957 | name: mapid | ||
| 958 | required: true | ||
| 959 | type: integer | ||
| 960 | - description: JWT Token | ||
| 961 | in: header | ||
| 962 | name: Authorization | ||
| 963 | required: true | ||
| 964 | type: string | ||
| 965 | - description: Host Demo | ||
| 966 | in: formData | ||
| 967 | name: host_demo | ||
| 968 | required: true | ||
| 969 | type: file | ||
| 970 | - description: Partner Demo | ||
| 971 | in: formData | ||
| 972 | name: partner_demo | ||
| 973 | type: file | ||
| 974 | - description: Is Partner Orange | ||
| 975 | in: formData | ||
| 976 | name: is_partner_orange | ||
| 977 | type: boolean | ||
| 978 | - description: Partner ID | ||
| 979 | in: formData | ||
| 980 | name: partner_id | ||
| 981 | type: string | ||
| 982 | produces: | ||
| 983 | - application/json | ||
| 984 | responses: | ||
| 985 | "200": | ||
| 986 | description: OK | ||
| 987 | schema: | ||
| 988 | allOf: | ||
| 989 | - $ref: '#/definitions/models.Response' | ||
| 990 | - properties: | ||
| 991 | data: | ||
| 992 | $ref: '#/definitions/handlers.RecordResponse' | ||
| 993 | type: object | ||
| 994 | tags: | ||
| 995 | - maps / leaderboards | ||
| 996 | /maps/{mapid}/record/{recordid}: | ||
| 997 | delete: | ||
| 998 | description: Delete record with specified map and record id. | ||
| 999 | parameters: | ||
| 1000 | - description: Map ID | ||
| 1001 | in: path | ||
| 1002 | name: mapid | ||
| 1003 | required: true | ||
| 1004 | type: integer | ||
| 1005 | - description: Record ID | ||
| 1006 | in: path | ||
| 1007 | name: recordid | ||
| 1008 | required: true | ||
| 1009 | type: integer | ||
| 1010 | - description: JWT Token | ||
| 1011 | in: header | ||
| 1012 | name: Authorization | ||
| 1013 | required: true | ||
| 1014 | type: string | ||
| 1015 | produces: | ||
| 1016 | - application/json | ||
| 1017 | responses: | ||
| 1018 | "200": | ||
| 1019 | description: OK | ||
| 1020 | schema: | ||
| 1021 | $ref: '#/definitions/models.Response' | ||
| 1022 | tags: | ||
| 1023 | - maps / leaderboards | ||
| 1024 | /maps/{mapid}/summary: | ||
| 1025 | delete: | ||
| 1026 | description: Delete map summary with specified map id. | ||
| 1027 | parameters: | ||
| 1028 | - description: JWT Token | ||
| 1029 | in: header | ||
| 1030 | name: Authorization | ||
| 1031 | required: true | ||
| 1032 | type: string | ||
| 1033 | - description: Map ID | ||
| 1034 | in: path | ||
| 1035 | name: mapid | ||
| 1036 | required: true | ||
| 1037 | type: integer | ||
| 1038 | - description: Body | ||
| 1039 | in: body | ||
| 1040 | name: request | ||
| 1041 | required: true | ||
| 1042 | schema: | ||
| 1043 | $ref: '#/definitions/handlers.DeleteMapSummaryRequest' | ||
| 1044 | produces: | ||
| 1045 | - application/json | ||
| 1046 | responses: | ||
| 1047 | "200": | ||
| 1048 | description: OK | ||
| 1049 | schema: | ||
| 1050 | allOf: | ||
| 1051 | - $ref: '#/definitions/models.Response' | ||
| 1052 | - properties: | ||
| 1053 | data: | ||
| 1054 | $ref: '#/definitions/handlers.DeleteMapSummaryRequest' | ||
| 1055 | type: object | ||
| 1056 | tags: | ||
| 1057 | - maps / summary | ||
| 1058 | get: | ||
| 1059 | description: Get map summary with specified id. | ||
| 1060 | parameters: | ||
| 1061 | - description: Map ID | ||
| 1062 | in: path | ||
| 1063 | name: mapid | ||
| 1064 | required: true | ||
| 1065 | type: integer | ||
| 1066 | produces: | ||
| 1067 | - application/json | ||
| 1068 | responses: | ||
| 1069 | "200": | ||
| 1070 | description: OK | ||
| 1071 | schema: | ||
| 1072 | allOf: | ||
| 1073 | - $ref: '#/definitions/models.Response' | ||
| 1074 | - properties: | ||
| 1075 | data: | ||
| 1076 | $ref: '#/definitions/handlers.MapSummaryResponse' | ||
| 1077 | type: object | ||
| 1078 | tags: | ||
| 1079 | - maps / summary | ||
| 1080 | post: | ||
| 1081 | description: Create map summary with specified map id. | ||
| 1082 | parameters: | ||
| 1083 | - description: JWT Token | ||
| 1084 | in: header | ||
| 1085 | name: Authorization | ||
| 1086 | required: true | ||
| 1087 | type: string | ||
| 1088 | - description: Map ID | ||
| 1089 | in: path | ||
| 1090 | name: mapid | ||
| 1091 | required: true | ||
| 1092 | type: integer | ||
| 1093 | - description: Body | ||
| 1094 | in: body | ||
| 1095 | name: request | ||
| 1096 | required: true | ||
| 1097 | schema: | ||
| 1098 | $ref: '#/definitions/handlers.CreateMapSummaryRequest' | ||
| 1099 | produces: | ||
| 1100 | - application/json | ||
| 1101 | responses: | ||
| 1102 | "200": | ||
| 1103 | description: OK | ||
| 1104 | schema: | ||
| 1105 | allOf: | ||
| 1106 | - $ref: '#/definitions/models.Response' | ||
| 1107 | - properties: | ||
| 1108 | data: | ||
| 1109 | $ref: '#/definitions/handlers.CreateMapSummaryRequest' | ||
| 1110 | type: object | ||
| 1111 | tags: | ||
| 1112 | - maps / summary | ||
| 1113 | put: | ||
| 1114 | description: Edit map summary with specified map id. | ||
| 1115 | parameters: | ||
| 1116 | - description: JWT Token | ||
| 1117 | in: header | ||
| 1118 | name: Authorization | ||
| 1119 | required: true | ||
| 1120 | type: string | ||
| 1121 | - description: Map ID | ||
| 1122 | in: path | ||
| 1123 | name: mapid | ||
| 1124 | required: true | ||
| 1125 | type: integer | ||
| 1126 | - description: Body | ||
| 1127 | in: body | ||
| 1128 | name: request | ||
| 1129 | required: true | ||
| 1130 | schema: | ||
| 1131 | $ref: '#/definitions/handlers.EditMapSummaryRequest' | ||
| 1132 | produces: | ||
| 1133 | - application/json | ||
| 1134 | responses: | ||
| 1135 | "200": | ||
| 1136 | description: OK | ||
| 1137 | schema: | ||
| 1138 | allOf: | ||
| 1139 | - $ref: '#/definitions/models.Response' | ||
| 1140 | - properties: | ||
| 1141 | data: | ||
| 1142 | $ref: '#/definitions/handlers.EditMapSummaryRequest' | ||
| 1143 | type: object | ||
| 1144 | tags: | ||
| 1145 | - maps / summary | ||
| 1146 | /profile: | ||
| 1147 | get: | ||
| 1148 | consumes: | ||
| 1149 | - application/json | ||
| 1150 | description: Get profile page of session user. | ||
| 1151 | parameters: | ||
| 1152 | - description: JWT Token | ||
| 1153 | in: header | ||
| 1154 | name: Authorization | ||
| 1155 | required: true | ||
| 1156 | type: string | ||
| 1157 | produces: | ||
| 1158 | - application/json | ||
| 1159 | responses: | ||
| 1160 | "200": | ||
| 1161 | description: OK | ||
| 1162 | schema: | ||
| 1163 | allOf: | ||
| 1164 | - $ref: '#/definitions/models.Response' | ||
| 1165 | - properties: | ||
| 1166 | data: | ||
| 1167 | $ref: '#/definitions/handlers.ProfileResponse' | ||
| 1168 | type: object | ||
| 1169 | tags: | ||
| 1170 | - users | ||
| 1171 | post: | ||
| 1172 | consumes: | ||
| 1173 | - application/json | ||
| 1174 | description: Update profile page of session user. | ||
| 1175 | parameters: | ||
| 1176 | - description: JWT Token | ||
| 1177 | in: header | ||
| 1178 | name: Authorization | ||
| 1179 | required: true | ||
| 1180 | type: string | ||
| 1181 | produces: | ||
| 1182 | - application/json | ||
| 1183 | responses: | ||
| 1184 | "200": | ||
| 1185 | description: OK | ||
| 1186 | schema: | ||
| 1187 | allOf: | ||
| 1188 | - $ref: '#/definitions/models.Response' | ||
| 1189 | - properties: | ||
| 1190 | data: | ||
| 1191 | $ref: '#/definitions/handlers.ProfileResponse' | ||
| 1192 | type: object | ||
| 1193 | tags: | ||
| 1194 | - users | ||
| 1195 | put: | ||
| 1196 | consumes: | ||
| 1197 | - application/json | ||
| 1198 | description: Update country code of session user. | ||
| 1199 | parameters: | ||
| 1200 | - description: JWT Token | ||
| 1201 | in: header | ||
| 1202 | name: Authorization | ||
| 1203 | required: true | ||
| 1204 | type: string | ||
| 1205 | - description: Country Code [XX] | ||
| 1206 | in: query | ||
| 1207 | name: country_code | ||
| 1208 | required: true | ||
| 1209 | type: string | ||
| 1210 | produces: | ||
| 1211 | - application/json | ||
| 1212 | responses: | ||
| 1213 | "200": | ||
| 1214 | description: OK | ||
| 1215 | schema: | ||
| 1216 | $ref: '#/definitions/models.Response' | ||
| 1217 | tags: | ||
| 1218 | - users | ||
| 1219 | /rankings: | ||
| 1220 | get: | ||
| 1221 | description: Get rankings of every player. | ||
| 1222 | produces: | ||
| 1223 | - application/json | ||
| 1224 | responses: | ||
| 1225 | "200": | ||
| 1226 | description: OK | ||
| 1227 | schema: | ||
| 1228 | allOf: | ||
| 1229 | - $ref: '#/definitions/models.Response' | ||
| 1230 | - properties: | ||
| 1231 | data: | ||
| 1232 | $ref: '#/definitions/handlers.RankingsResponse' | ||
| 1233 | type: object | ||
| 1234 | tags: | ||
| 1235 | - rankings | ||
| 1236 | /search: | ||
| 1237 | get: | ||
| 1238 | description: Get all user and map data matching to the query. | ||
| 1239 | parameters: | ||
| 1240 | - description: Search user or map name. | ||
| 1241 | in: query | ||
| 1242 | name: q | ||
| 1243 | type: string | ||
| 1244 | produces: | ||
| 1245 | - application/json | ||
| 1246 | responses: | ||
| 1247 | "200": | ||
| 1248 | description: OK | ||
| 1249 | schema: | ||
| 1250 | allOf: | ||
| 1251 | - $ref: '#/definitions/models.Response' | ||
| 1252 | - properties: | ||
| 1253 | data: | ||
| 1254 | $ref: '#/definitions/handlers.SearchResponse' | ||
| 1255 | type: object | ||
| 1256 | tags: | ||
| 1257 | - search | ||
| 1258 | /token: | ||
| 1259 | delete: | ||
| 1260 | description: Deletes the token cookie from the user. | ||
| 1261 | produces: | ||
| 1262 | - application/json | ||
| 1263 | responses: | ||
| 1264 | "200": | ||
| 1265 | description: OK | ||
| 1266 | schema: | ||
| 1267 | allOf: | ||
| 1268 | - $ref: '#/definitions/models.Response' | ||
| 1269 | - properties: | ||
| 1270 | data: | ||
| 1271 | $ref: '#/definitions/handlers.LoginResponse' | ||
| 1272 | type: object | ||
| 1273 | "404": | ||
| 1274 | description: Not Found | ||
| 1275 | schema: | ||
| 1276 | $ref: '#/definitions/models.Response' | ||
| 1277 | tags: | ||
| 1278 | - auth | ||
| 1279 | get: | ||
| 1280 | description: Gets the token cookie value from the user. | ||
| 1281 | produces: | ||
| 1282 | - application/json | ||
| 1283 | responses: | ||
| 1284 | "200": | ||
| 1285 | description: OK | ||
| 1286 | schema: | ||
| 1287 | allOf: | ||
| 1288 | - $ref: '#/definitions/models.Response' | ||
| 1289 | - properties: | ||
| 1290 | data: | ||
| 1291 | $ref: '#/definitions/handlers.LoginResponse' | ||
| 1292 | type: object | ||
| 1293 | "404": | ||
| 1294 | description: Not Found | ||
| 1295 | schema: | ||
| 1296 | $ref: '#/definitions/models.Response' | ||
| 1297 | tags: | ||
| 1298 | - auth | ||
| 1299 | /users/{userid}: | ||
| 1300 | get: | ||
| 1301 | consumes: | ||
| 1302 | - application/json | ||
| 1303 | description: Get profile page of another user. | ||
| 1304 | parameters: | ||
| 1305 | - description: User ID | ||
| 1306 | in: path | ||
| 1307 | name: userid | ||
| 1308 | required: true | ||
| 1309 | type: integer | ||
| 1310 | produces: | ||
| 1311 | - application/json | ||
| 1312 | responses: | ||
| 1313 | "200": | ||
| 1314 | description: OK | ||
| 1315 | schema: | ||
| 1316 | allOf: | ||
| 1317 | - $ref: '#/definitions/models.Response' | ||
| 1318 | - properties: | ||
| 1319 | data: | ||
| 1320 | $ref: '#/definitions/handlers.ProfileResponse' | ||
| 1321 | type: object | ||
| 1322 | tags: | ||
| 1323 | - users | ||
| 1324 | swagger: "2.0" | ||
diff --git a/backend/go.mod b/backend/go.mod new file mode 100644 index 0000000..2dbad6b --- /dev/null +++ b/backend/go.mod | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | module lphub | ||
| 2 | |||
| 3 | go 1.23 | ||
| 4 | |||
| 5 | require ( | ||
| 6 | github.com/gin-gonic/gin v1.10.0 | ||
| 7 | github.com/joho/godotenv v1.5.1 | ||
| 8 | ) | ||
| 9 | |||
| 10 | require ( | ||
| 11 | github.com/golang-jwt/jwt/v4 v4.5.0 | ||
| 12 | github.com/google/uuid v1.6.0 | ||
| 13 | github.com/pektezol/steam_go v1.1.2 | ||
| 14 | github.com/swaggo/files v1.0.1 | ||
| 15 | github.com/swaggo/gin-swagger v1.6.0 | ||
| 16 | github.com/swaggo/swag v1.16.3 | ||
| 17 | ) | ||
| 18 | |||
| 19 | require ( | ||
| 20 | cloud.google.com/go/auth v0.9.3 // indirect | ||
| 21 | cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect | ||
| 22 | cloud.google.com/go/compute/metadata v0.5.0 // indirect | ||
| 23 | github.com/KyleBanks/depth v1.2.1 // indirect | ||
| 24 | github.com/bytedance/sonic v1.12.2 // indirect | ||
| 25 | github.com/bytedance/sonic/loader v0.2.0 // indirect | ||
| 26 | github.com/cloudwego/base64x v0.1.4 // indirect | ||
| 27 | github.com/cloudwego/iasm v0.2.0 // indirect | ||
| 28 | github.com/felixge/httpsnoop v1.0.4 // indirect | ||
| 29 | github.com/gabriel-vasile/mimetype v1.4.5 // indirect | ||
| 30 | github.com/go-logr/logr v1.4.2 // indirect | ||
| 31 | github.com/go-logr/stdr v1.2.2 // indirect | ||
| 32 | github.com/go-openapi/jsonpointer v0.21.0 // indirect | ||
| 33 | github.com/go-openapi/jsonreference v0.21.0 // indirect | ||
| 34 | github.com/go-openapi/spec v0.21.0 // indirect | ||
| 35 | github.com/go-openapi/swag v0.23.0 // indirect | ||
| 36 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | ||
| 37 | github.com/google/s2a-go v0.1.8 // indirect | ||
| 38 | github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect | ||
| 39 | github.com/googleapis/gax-go/v2 v2.13.0 // indirect | ||
| 40 | github.com/josharian/intern v1.0.0 // indirect | ||
| 41 | github.com/klauspost/cpuid/v2 v2.2.8 // indirect | ||
| 42 | github.com/mailru/easyjson v0.7.7 // indirect | ||
| 43 | github.com/twitchyliquid64/golang-asm v0.15.1 // indirect | ||
| 44 | go.opencensus.io v0.24.0 // indirect | ||
| 45 | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect | ||
| 46 | go.opentelemetry.io/otel v1.29.0 // indirect | ||
| 47 | go.opentelemetry.io/otel/metric v1.29.0 // indirect | ||
| 48 | go.opentelemetry.io/otel/trace v1.29.0 // indirect | ||
| 49 | golang.org/x/arch v0.10.0 // indirect | ||
| 50 | golang.org/x/tools v0.25.0 // indirect | ||
| 51 | google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect | ||
| 52 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect | ||
| 53 | google.golang.org/grpc v1.66.0 // indirect | ||
| 54 | gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| 55 | ) | ||
| 56 | |||
| 57 | require ( | ||
| 58 | github.com/gin-contrib/sse v0.1.0 // indirect | ||
| 59 | github.com/go-playground/locales v0.14.1 // indirect | ||
| 60 | github.com/go-playground/universal-translator v0.18.1 // indirect | ||
| 61 | github.com/go-playground/validator/v10 v10.22.1 // indirect | ||
| 62 | github.com/goccy/go-json v0.10.3 // indirect | ||
| 63 | github.com/json-iterator/go v1.1.12 // indirect | ||
| 64 | github.com/leodido/go-urn v1.4.0 // indirect | ||
| 65 | github.com/lib/pq v1.10.9 | ||
| 66 | github.com/mattn/go-isatty v0.0.20 // indirect | ||
| 67 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
| 68 | github.com/modern-go/reflect2 v1.0.2 // indirect | ||
| 69 | github.com/pektezol/bitreader v1.4.3 | ||
| 70 | github.com/pelletier/go-toml/v2 v2.2.3 // indirect | ||
| 71 | github.com/ugorji/go/codec v1.2.12 // indirect | ||
| 72 | golang.org/x/crypto v0.27.0 // indirect | ||
| 73 | golang.org/x/net v0.29.0 // indirect | ||
| 74 | golang.org/x/oauth2 v0.23.0 | ||
| 75 | golang.org/x/sys v0.25.0 // indirect | ||
| 76 | golang.org/x/text v0.18.0 // indirect | ||
| 77 | google.golang.org/api v0.196.0 | ||
| 78 | google.golang.org/protobuf v1.34.2 // indirect | ||
| 79 | ) | ||
diff --git a/backend/go.sum b/backend/go.sum new file mode 100644 index 0000000..10504e4 --- /dev/null +++ b/backend/go.sum | |||
| @@ -0,0 +1,270 @@ | |||
| 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= | ||
| 2 | cloud.google.com/go/auth v0.9.3 h1:VOEUIAADkkLtyfr3BLa3R8Ed/j6w1jTBmARx+wb5w5U= | ||
| 3 | cloud.google.com/go/auth v0.9.3/go.mod h1:7z6VY+7h3KUdRov5F1i8NDP5ZzWKYmEPO842BgCsmTk= | ||
| 4 | cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= | ||
| 5 | cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= | ||
| 6 | cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= | ||
| 7 | cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= | ||
| 8 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= | ||
| 9 | github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= | ||
| 10 | github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= | ||
| 11 | github.com/bytedance/sonic v1.12.2 h1:oaMFuRTpMHYLpCntGca65YWt5ny+wAceDERTkT2L9lg= | ||
| 12 | github.com/bytedance/sonic v1.12.2/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= | ||
| 13 | github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= | ||
| 14 | github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= | ||
| 15 | github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= | ||
| 16 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= | ||
| 17 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= | ||
| 18 | github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= | ||
| 19 | github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= | ||
| 20 | github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= | ||
| 21 | github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= | ||
| 22 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= | ||
| 23 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
| 24 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||
| 25 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
| 26 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= | ||
| 27 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= | ||
| 28 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= | ||
| 29 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= | ||
| 30 | github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= | ||
| 31 | github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= | ||
| 32 | github.com/gabriel-vasile/mimetype v1.4.5 h1:J7wGKdGu33ocBOhGy0z653k/lFKLFDPJMG8Gql0kxn4= | ||
| 33 | github.com/gabriel-vasile/mimetype v1.4.5/go.mod h1:ibHel+/kbxn9x2407k1izTA1S81ku1z/DlgOW2QE0M4= | ||
| 34 | github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= | ||
| 35 | github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= | ||
| 36 | github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= | ||
| 37 | github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= | ||
| 38 | github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= | ||
| 39 | github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= | ||
| 40 | github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= | ||
| 41 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= | ||
| 42 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= | ||
| 43 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= | ||
| 44 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= | ||
| 45 | github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= | ||
| 46 | github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= | ||
| 47 | github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= | ||
| 48 | github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= | ||
| 49 | github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= | ||
| 50 | github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= | ||
| 51 | github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= | ||
| 52 | github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= | ||
| 53 | github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= | ||
| 54 | github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= | ||
| 55 | github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= | ||
| 56 | github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= | ||
| 57 | github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= | ||
| 58 | github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= | ||
| 59 | github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA= | ||
| 60 | github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= | ||
| 61 | github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= | ||
| 62 | github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= | ||
| 63 | github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= | ||
| 64 | github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= | ||
| 65 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= | ||
| 66 | github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | ||
| 67 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= | ||
| 68 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | ||
| 69 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= | ||
| 70 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | ||
| 71 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | ||
| 72 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= | ||
| 73 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= | ||
| 74 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= | ||
| 75 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= | ||
| 76 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= | ||
| 77 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= | ||
| 78 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= | ||
| 79 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= | ||
| 80 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||
| 81 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||
| 82 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
| 83 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
| 84 | github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
| 85 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= | ||
| 86 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | ||
| 87 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= | ||
| 88 | github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= | ||
| 89 | github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= | ||
| 90 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||
| 91 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= | ||
| 92 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||
| 93 | github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= | ||
| 94 | github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= | ||
| 95 | github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= | ||
| 96 | github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= | ||
| 97 | github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= | ||
| 98 | github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= | ||
| 99 | github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= | ||
| 100 | github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= | ||
| 101 | github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= | ||
| 102 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= | ||
| 103 | github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= | ||
| 104 | github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= | ||
| 105 | github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= | ||
| 106 | github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= | ||
| 107 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= | ||
| 108 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= | ||
| 109 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= | ||
| 110 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= | ||
| 111 | github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= | ||
| 112 | github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= | ||
| 113 | github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= | ||
| 114 | github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= | ||
| 115 | github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= | ||
| 116 | github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= | ||
| 117 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= | ||
| 118 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | ||
| 119 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= | ||
| 120 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= | ||
| 121 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= | ||
| 122 | github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= | ||
| 123 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= | ||
| 124 | github.com/pektezol/bitreader v1.4.3 h1:+WjsD6qOAaI6Q1jOOlEJcnaEso8vPMKRZnnaDnZhTSg= | ||
| 125 | github.com/pektezol/bitreader v1.4.3/go.mod h1:xBQEsQpOf8B5yPrnOTkirZGyVUV6Bqp0ups2RIlTskk= | ||
| 126 | github.com/pektezol/steam_go v1.1.2 h1:fta6SW+La8NfmCtR/Kn73bAmTBvCgUkkLCplsJGzx7g= | ||
| 127 | github.com/pektezol/steam_go v1.1.2/go.mod h1:8dk95CLOQKRr0BA8ChnNbTEe0/f2Ibi5O4rmpS9oZCo= | ||
| 128 | github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= | ||
| 129 | github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= | ||
| 130 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||
| 131 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||
| 132 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | ||
| 133 | github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= | ||
| 134 | github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= | ||
| 135 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | ||
| 136 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= | ||
| 137 | github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= | ||
| 138 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= | ||
| 139 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||
| 140 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||
| 141 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= | ||
| 142 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= | ||
| 143 | github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= | ||
| 144 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= | ||
| 145 | github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= | ||
| 146 | github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= | ||
| 147 | github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M= | ||
| 148 | github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= | ||
| 149 | github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= | ||
| 150 | github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= | ||
| 151 | github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= | ||
| 152 | github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= | ||
| 153 | github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= | ||
| 154 | github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= | ||
| 155 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= | ||
| 156 | go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= | ||
| 157 | go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= | ||
| 158 | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= | ||
| 159 | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= | ||
| 160 | go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= | ||
| 161 | go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= | ||
| 162 | go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= | ||
| 163 | go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= | ||
| 164 | go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= | ||
| 165 | go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= | ||
| 166 | golang.org/x/arch v0.10.0 h1:S3huipmSclq3PJMNe76NGwkBR504WFkQ5dhzWzP8ZW8= | ||
| 167 | golang.org/x/arch v0.10.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= | ||
| 168 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | ||
| 169 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= | ||
| 170 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= | ||
| 171 | golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= | ||
| 172 | golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= | ||
| 173 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | ||
| 174 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= | ||
| 175 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= | ||
| 176 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= | ||
| 177 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= | ||
| 178 | golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= | ||
| 179 | golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= | ||
| 180 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
| 181 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
| 182 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
| 183 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | ||
| 184 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | ||
| 185 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
| 186 | golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | ||
| 187 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | ||
| 188 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= | ||
| 189 | golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= | ||
| 190 | golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= | ||
| 191 | golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= | ||
| 192 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= | ||
| 193 | golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= | ||
| 194 | golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= | ||
| 195 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
| 196 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
| 197 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
| 198 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
| 199 | golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= | ||
| 200 | golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= | ||
| 201 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
| 202 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
| 203 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
| 204 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
| 205 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
| 206 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 207 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 208 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 209 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 210 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 211 | golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= | ||
| 212 | golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | ||
| 213 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= | ||
| 214 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= | ||
| 215 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= | ||
| 216 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | ||
| 217 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | ||
| 218 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= | ||
| 219 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | ||
| 220 | golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= | ||
| 221 | golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= | ||
| 222 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | ||
| 223 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | ||
| 224 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= | ||
| 225 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= | ||
| 226 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= | ||
| 227 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | ||
| 228 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= | ||
| 229 | golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= | ||
| 230 | golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= | ||
| 231 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
| 232 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
| 233 | google.golang.org/api v0.196.0 h1:k/RafYqebaIJBO3+SMnfEGtFVlvp5vSgqTUF54UN/zg= | ||
| 234 | google.golang.org/api v0.196.0/go.mod h1:g9IL21uGkYgvQ5BZg6BAtoGJQIm8r6EgaAbpNey5wBE= | ||
| 235 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= | ||
| 236 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= | ||
| 237 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= | ||
| 238 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= | ||
| 239 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= | ||
| 240 | google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= | ||
| 241 | google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= | ||
| 242 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= | ||
| 243 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= | ||
| 244 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= | ||
| 245 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= | ||
| 246 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= | ||
| 247 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= | ||
| 248 | google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= | ||
| 249 | google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= | ||
| 250 | google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= | ||
| 251 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= | ||
| 252 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= | ||
| 253 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= | ||
| 254 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= | ||
| 255 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= | ||
| 256 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | ||
| 257 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | ||
| 258 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | ||
| 259 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= | ||
| 260 | google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= | ||
| 261 | google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= | ||
| 262 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
| 263 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= | ||
| 264 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= | ||
| 265 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||
| 266 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | ||
| 267 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||
| 268 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= | ||
| 269 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= | ||
| 270 | nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= | ||
diff --git a/backend/handlers/discussions.go b/backend/handlers/discussions.go index 0fc0c11..604eb39 100644 --- a/backend/handlers/discussions.go +++ b/backend/handlers/discussions.go | |||
| @@ -5,9 +5,10 @@ import ( | |||
| 5 | "strconv" | 5 | "strconv" |
| 6 | "time" | 6 | "time" |
| 7 | 7 | ||
| 8 | "lphub/database" | ||
| 9 | "lphub/models" | ||
| 10 | |||
| 8 | "github.com/gin-gonic/gin" | 11 | "github.com/gin-gonic/gin" |
| 9 | "github.com/pektezol/leastportalshub/backend/database" | ||
| 10 | "github.com/pektezol/leastportalshub/backend/models" | ||
| 11 | ) | 12 | ) |
| 12 | 13 | ||
| 13 | type MapDiscussionResponse struct { | 14 | type MapDiscussionResponse struct { |
diff --git a/backend/handlers/home.go b/backend/handlers/home.go index 16ac993..1734d28 100644 --- a/backend/handlers/home.go +++ b/backend/handlers/home.go | |||
| @@ -6,9 +6,10 @@ import ( | |||
| 6 | "sort" | 6 | "sort" |
| 7 | "strings" | 7 | "strings" |
| 8 | 8 | ||
| 9 | "lphub/database" | ||
| 10 | "lphub/models" | ||
| 11 | |||
| 9 | "github.com/gin-gonic/gin" | 12 | "github.com/gin-gonic/gin" |
| 10 | "github.com/pektezol/leastportalshub/backend/database" | ||
| 11 | "github.com/pektezol/leastportalshub/backend/models" | ||
| 12 | ) | 13 | ) |
| 13 | 14 | ||
| 14 | type SearchResponse struct { | 15 | type SearchResponse struct { |
diff --git a/backend/handlers/login.go b/backend/handlers/login.go index 8794989..565ebdb 100644 --- a/backend/handlers/login.go +++ b/backend/handlers/login.go | |||
| @@ -8,10 +8,11 @@ import ( | |||
| 8 | "os" | 8 | "os" |
| 9 | "time" | 9 | "time" |
| 10 | 10 | ||
| 11 | "lphub/database" | ||
| 12 | "lphub/models" | ||
| 13 | |||
| 11 | "github.com/gin-gonic/gin" | 14 | "github.com/gin-gonic/gin" |
| 12 | "github.com/golang-jwt/jwt/v4" | 15 | "github.com/golang-jwt/jwt/v4" |
| 13 | "github.com/pektezol/leastportalshub/backend/database" | ||
| 14 | "github.com/pektezol/leastportalshub/backend/models" | ||
| 15 | "github.com/pektezol/steam_go" | 16 | "github.com/pektezol/steam_go" |
| 16 | ) | 17 | ) |
| 17 | 18 | ||
diff --git a/backend/handlers/logs.go b/backend/handlers/logs.go index bf9e494..76ddac4 100644 --- a/backend/handlers/logs.go +++ b/backend/handlers/logs.go | |||
| @@ -5,9 +5,10 @@ import ( | |||
| 5 | "net/http" | 5 | "net/http" |
| 6 | "time" | 6 | "time" |
| 7 | 7 | ||
| 8 | "lphub/database" | ||
| 9 | "lphub/models" | ||
| 10 | |||
| 8 | "github.com/gin-gonic/gin" | 11 | "github.com/gin-gonic/gin" |
| 9 | "github.com/pektezol/leastportalshub/backend/database" | ||
| 10 | "github.com/pektezol/leastportalshub/backend/models" | ||
| 11 | ) | 12 | ) |
| 12 | 13 | ||
| 13 | const ( | 14 | const ( |
diff --git a/backend/handlers/map.go b/backend/handlers/map.go index 2f38b32..56c3455 100644 --- a/backend/handlers/map.go +++ b/backend/handlers/map.go | |||
| @@ -5,9 +5,10 @@ import ( | |||
| 5 | "strconv" | 5 | "strconv" |
| 6 | "time" | 6 | "time" |
| 7 | 7 | ||
| 8 | "lphub/database" | ||
| 9 | "lphub/models" | ||
| 10 | |||
| 8 | "github.com/gin-gonic/gin" | 11 | "github.com/gin-gonic/gin" |
| 9 | "github.com/pektezol/leastportalshub/backend/database" | ||
| 10 | "github.com/pektezol/leastportalshub/backend/models" | ||
| 11 | ) | 12 | ) |
| 12 | 13 | ||
| 13 | type MapSummaryResponse struct { | 14 | type MapSummaryResponse struct { |
diff --git a/backend/handlers/mod.go b/backend/handlers/mod.go index dc3d08d..4fdc78a 100644 --- a/backend/handlers/mod.go +++ b/backend/handlers/mod.go | |||
| @@ -6,9 +6,10 @@ import ( | |||
| 6 | "strconv" | 6 | "strconv" |
| 7 | "time" | 7 | "time" |
| 8 | 8 | ||
| 9 | "lphub/database" | ||
| 10 | "lphub/models" | ||
| 11 | |||
| 9 | "github.com/gin-gonic/gin" | 12 | "github.com/gin-gonic/gin" |
| 10 | "github.com/pektezol/leastportalshub/backend/database" | ||
| 11 | "github.com/pektezol/leastportalshub/backend/models" | ||
| 12 | ) | 13 | ) |
| 13 | 14 | ||
| 14 | type CreateMapSummaryRequest struct { | 15 | type CreateMapSummaryRequest struct { |
diff --git a/backend/handlers/record.go b/backend/handlers/record.go index c620430..fea6b5d 100644 --- a/backend/handlers/record.go +++ b/backend/handlers/record.go | |||
| @@ -12,11 +12,12 @@ import ( | |||
| 12 | "strconv" | 12 | "strconv" |
| 13 | "strings" | 13 | "strings" |
| 14 | 14 | ||
| 15 | "lphub/database" | ||
| 16 | "lphub/models" | ||
| 17 | "lphub/parser" | ||
| 18 | |||
| 15 | "github.com/gin-gonic/gin" | 19 | "github.com/gin-gonic/gin" |
| 16 | "github.com/google/uuid" | 20 | "github.com/google/uuid" |
| 17 | "github.com/pektezol/leastportalshub/backend/database" | ||
| 18 | "github.com/pektezol/leastportalshub/backend/models" | ||
| 19 | "github.com/pektezol/leastportalshub/backend/parser" | ||
| 20 | "golang.org/x/oauth2/google" | 21 | "golang.org/x/oauth2/google" |
| 21 | "golang.org/x/oauth2/jwt" | 22 | "golang.org/x/oauth2/jwt" |
| 22 | "google.golang.org/api/drive/v3" | 23 | "google.golang.org/api/drive/v3" |
diff --git a/backend/handlers/user.go b/backend/handlers/user.go index 8febf3a..45daa31 100644 --- a/backend/handlers/user.go +++ b/backend/handlers/user.go | |||
| @@ -6,9 +6,10 @@ import ( | |||
| 6 | "regexp" | 6 | "regexp" |
| 7 | "time" | 7 | "time" |
| 8 | 8 | ||
| 9 | "lphub/database" | ||
| 10 | "lphub/models" | ||
| 11 | |||
| 9 | "github.com/gin-gonic/gin" | 12 | "github.com/gin-gonic/gin" |
| 10 | "github.com/pektezol/leastportalshub/backend/database" | ||
| 11 | "github.com/pektezol/leastportalshub/backend/models" | ||
| 12 | ) | 13 | ) |
| 13 | 14 | ||
| 14 | type ProfileResponse struct { | 15 | type ProfileResponse struct { |
diff --git a/backend/main.go b/backend/main.go new file mode 100644 index 0000000..202c607 --- /dev/null +++ b/backend/main.go | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | package main | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "fmt" | ||
| 5 | "log" | ||
| 6 | "os" | ||
| 7 | |||
| 8 | "lphub/api" | ||
| 9 | "lphub/database" | ||
| 10 | _ "lphub/docs" | ||
| 11 | |||
| 12 | "github.com/gin-gonic/gin" | ||
| 13 | "github.com/joho/godotenv" | ||
| 14 | ) | ||
| 15 | |||
| 16 | // @title Least Portals Database API | ||
| 17 | // @version 1.0 | ||
| 18 | // @description Backend API endpoints for the Least Portals Database. | ||
| 19 | |||
| 20 | // @license.name GNU Affero General Public License, Version 3 | ||
| 21 | // @license.url https://www.gnu.org/licenses/agpl-3.0.html | ||
| 22 | |||
| 23 | // @host lp.ardapektezol.com | ||
| 24 | // @BasePath /api/v1 | ||
| 25 | func main() { | ||
| 26 | err := godotenv.Load() | ||
| 27 | if err != nil { | ||
| 28 | log.Fatal("Error loading .env file") | ||
| 29 | } | ||
| 30 | if os.Getenv("ENV") == "PROD" { | ||
| 31 | gin.SetMode(gin.ReleaseMode) | ||
| 32 | } | ||
| 33 | router := gin.Default() | ||
| 34 | database.ConnectDB() | ||
| 35 | api.InitRoutes(router) | ||
| 36 | router.Run(fmt.Sprintf(":%s", os.Getenv("PORT"))) | ||
| 37 | } | ||