fix api
This commit is contained in:
46
docs/docs.go
46
docs/docs.go
@@ -409,6 +409,52 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"/time/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get a specific time by its ID",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"times"
|
||||
],
|
||||
"summary": "Get time by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Time ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Response-Time"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Time not found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Error"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "General error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/time/{id}/download-url": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
|
||||
@@ -402,6 +402,52 @@
|
||||
}
|
||||
},
|
||||
"/time/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get a specific time by its ID",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"times"
|
||||
],
|
||||
"summary": "Get time by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Time ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Response-Time"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Time not found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Error"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "General error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/time/{id}/download-url": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
|
||||
@@ -390,6 +390,35 @@ paths:
|
||||
tags:
|
||||
- times
|
||||
/time/{id}:
|
||||
get:
|
||||
description: Get a specific time by its ID
|
||||
parameters:
|
||||
- description: Time ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/Response-Time'
|
||||
"404":
|
||||
description: Time not found
|
||||
schema:
|
||||
$ref: '#/definitions/Error'
|
||||
default:
|
||||
description: General error response
|
||||
schema:
|
||||
$ref: '#/definitions/Error'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get time by ID
|
||||
tags:
|
||||
- times
|
||||
/time/{id}/download-url:
|
||||
get:
|
||||
description: Get a download url for the bot replay of a time by its ID if it
|
||||
exists
|
||||
|
||||
@@ -336,7 +336,7 @@ func (h *TimesHandler) GetPlacements(ctx *gin.Context) {
|
||||
// @Failure 404 {object} dto.Error "Time does not have a Bot"
|
||||
// @Failure 404 {object} dto.Error "Bot not found"
|
||||
// @Failure default {object} dto.Error "General error response"
|
||||
// @Router /time/{id} [get]
|
||||
// @Router /time/{id}/download-url [get]
|
||||
func (h *TimesHandler) GetDownloadUrl(ctx *gin.Context) {
|
||||
// Extract time ID from path parameter
|
||||
id := ctx.Param("id")
|
||||
|
||||
Reference in New Issue
Block a user