From 937160bfda2c8edc5ff5dd73899b517bb0ceb515 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Wed, 3 May 2023 16:05:30 +0300 Subject: fix: sql typos, routing change --- docs/docs.go | 67 +++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 28 deletions(-) (limited to 'docs/docs.go') diff --git a/docs/docs.go b/docs/docs.go index 164db20..cd129f0 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -26,13 +26,13 @@ const docTemplate = `{ "application/json" ], "tags": [ - "chapters" + "games \u0026 chapters" ], - "summary": "Get chapters from the specified game id.", + "summary": "Get maps from the specified chapter id.", "parameters": [ { "type": "integer", - "description": "Game ID", + "description": "Chapter ID", "name": "id", "in": "path", "required": true @@ -50,7 +50,7 @@ const docTemplate = `{ "type": "object", "properties": { "data": { - "$ref": "#/definitions/models.ChaptersResponse" + "$ref": "#/definitions/models.ChapterMapsResponse" } } } @@ -146,7 +146,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "games" + "games \u0026 chapters" ], "summary": "Get games from the leaderboards.", "responses": { @@ -180,18 +180,24 @@ const docTemplate = `{ } } }, - "/login": { + "/games/{id}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "login" + "games \u0026 chapters" + ], + "summary": "Get chapters from the specified game id.", + "parameters": [ + { + "type": "integer", + "description": "Game ID", + "name": "id", + "in": "path", + "required": true + } ], - "summary": "Get (redirect) login page for Steam auth.", "responses": { "200": { "description": "OK", @@ -204,7 +210,7 @@ const docTemplate = `{ "type": "object", "properties": { "data": { - "$ref": "#/definitions/models.LoginResponse" + "$ref": "#/definitions/models.ChaptersResponse" } } } @@ -220,24 +226,18 @@ const docTemplate = `{ } } }, - "/maps/{id}": { + "/login": { "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "maps" - ], - "summary": "Get maps from the specified chapter id.", - "parameters": [ - { - "type": "integer", - "description": "Chapter ID", - "name": "id", - "in": "path", - "required": true - } + "login" ], + "summary": "Get (redirect) login page for Steam auth.", "responses": { "200": { "description": "OK", @@ -250,10 +250,7 @@ const docTemplate = `{ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/models.MapShort" - } + "$ref": "#/definitions/models.LoginResponse" } } } @@ -751,6 +748,20 @@ const docTemplate = `{ } } }, + "models.ChapterMapsResponse": { + "type": "object", + "properties": { + "chapter": { + "$ref": "#/definitions/models.Chapter" + }, + "maps": { + "type": "array", + "items": { + "$ref": "#/definitions/models.MapShort" + } + } + } + }, "models.ChaptersResponse": { "type": "object", "properties": { -- cgit v1.2.3