Add endpoint to get a single task #106

Merged
konrad merged 9 commits from feature/get-single-task into master 2019-11-02 20:33:19 +00:00
5 changed files with 27 additions and 27 deletions
Showing only changes of commit bc275773bf - Show all commits

View File

@ -832,7 +832,7 @@ func (t *Task) Delete() (err error) {
}
// ReadOne gets one task by its ID
// @Summary Get task one task by its ID
// @Summary Get one task
// @Description Returns one task by its ID
// @tags task
// @Accept json

View File

@ -221,8 +221,8 @@ func registerAPIRoutes(a *echo.Group) {
},
}
a.PUT("/lists/:list", taskHandler.CreateWeb)
a.GET("/tasks/all", taskHandler.ReadAllWeb)
a.GET("/tasks/:listtask", taskHandler.ReadOneWeb)
a.GET("/tasks/all", taskHandler.ReadAllWeb)
a.DELETE("/tasks/:listtask", taskHandler.DeleteWeb)
a.POST("/tasks/:listtask", taskHandler.UpdateWeb)

View File

@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-11-02 20:57:36.039356735 +0100 CET m=+0.255625231
// 2019-11-02 21:06:44.848486087 +0100 CET m=+0.175638002
package swagger
@ -407,7 +407,7 @@ var doc = `{
"JWTKeyAuth": []
}
],
"description": "Returns a list by its ID.",
"description": "Returns a team by its ID.",
"consumes": [
"application/json"
],
@ -415,13 +415,13 @@ var doc = `{
"application/json"
],
"tags": [
"list"
"team"
],
"summary": "Gets one list",
"summary": "Gets one team",
"parameters": [
{
"type": "integer",
"description": "List ID",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
@ -429,13 +429,13 @@ var doc = `{
],
"responses": {
"200": {
"description": "The list",
"description": "The team",
"schema": {
"$ref": "#/definitions/models.List"
"$ref": "#/definitions/models.Team"
}
},
"403": {
"description": "The user does not have access to the list",
"description": "The user does not have access to the team",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
@ -2571,7 +2571,7 @@ var doc = `{
"tags": [
"task"
],
"summary": "Get task one task by its ID",
"summary": "Get one task",
"parameters": [
{
"type": "integer",

View File

@ -389,7 +389,7 @@
"JWTKeyAuth": []
}
],
"description": "Returns a list by its ID.",
"description": "Returns a team by its ID.",
"consumes": [
"application/json"
],
@ -397,13 +397,13 @@
"application/json"
],
"tags": [
"list"
"team"
],
"summary": "Gets one list",
"summary": "Gets one team",
"parameters": [
{
"type": "integer",
"description": "List ID",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
@ -411,13 +411,13 @@
],
"responses": {
"200": {
"description": "The list",
"description": "The team",
"schema": {
"$ref": "#/definitions/models.List"
"$ref": "#/definitions/models.Team"
}
},
"403": {
"description": "The user does not have access to the list",
"description": "The user does not have access to the team",
"schema": {
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
}
@ -2553,7 +2553,7 @@
"tags": [
"task"
],
"summary": "Get task one task by its ID",
"summary": "Get one task",
"parameters": [
{
"type": "integer",

View File

@ -1138,9 +1138,9 @@ paths:
get:
consumes:
- application/json
description: Returns a list by its ID.
description: Returns a team by its ID.
parameters:
- description: List ID
- description: Team ID
in: path
name: id
required: true
@ -1149,11 +1149,11 @@ paths:
- application/json
responses:
"200":
description: The list
description: The team
schema:
$ref: '#/definitions/models.List'
$ref: '#/definitions/models.Team'
"403":
description: The user does not have access to the list
description: The user does not have access to the team
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
"500":
@ -1162,9 +1162,9 @@ paths:
$ref: '#/definitions/models.Message'
security:
- JWTKeyAuth: []
summary: Gets one list
summary: Gets one team
tags:
- list
- team
post:
consumes:
- application/json
@ -3201,7 +3201,7 @@ paths:
$ref: '#/definitions/models.Message'
security:
- JWTKeyAuth: []
summary: Get task one task by its ID
summary: Get one task
tags:
- task
/tasks/bulk: