Assignees optimizations (#47)
This commit is contained in:
212
docs/docs.go
212
docs/docs.go
@ -1,6 +1,6 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-01-03 22:32:38.523459581 +0100 CET m=+0.109277724
|
||||
// 2019-01-07 23:16:50.581590248 +0100 CET m=+0.121922055
|
||||
|
||||
package docs
|
||||
|
||||
@ -2649,6 +2649,189 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Adds a new assignee to a task. The assignee needs to have access to the list, the doer must be able to edit this task.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Add a new assignee to a task",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The assingee object",
|
||||
"name": "assignee",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTaskAssginee"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The created assingee object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTaskAssginee"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid assignee object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees/bulk": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Adds new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Add new assignees to a task",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The array of assignees",
|
||||
"name": "assignee",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.BulkAssignees"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The created assingees object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTaskAssginee"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid assignee object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees/{userID}": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Un-assign a user from a task.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Delete an assignee",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Assignee user ID",
|
||||
"name": "userID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The assignee was successfully deleted.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not allowed to delete the assignee.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{task}/labels": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -3517,6 +3700,18 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.BulkAssignees": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assignees": {
|
||||
"description": "A list with all assignees",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.BulkTask": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -3795,6 +3990,17 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ListTaskAssginee": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ListUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -4081,6 +4287,10 @@ var doc = `{
|
||||
"team_id": {
|
||||
"description": "The team id.",
|
||||
"type": "integer"
|
||||
},
|
||||
"updated": {
|
||||
"description": "A unix timestamp when this relation was last updated. You cannot change this value.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2636,6 +2636,189 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Adds a new assignee to a task. The assignee needs to have access to the list, the doer must be able to edit this task.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Add a new assignee to a task",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The assingee object",
|
||||
"name": "assignee",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTaskAssginee"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The created assingee object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTaskAssginee"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid assignee object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees/bulk": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Adds new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Add new assignees to a task",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The array of assignees",
|
||||
"name": "assignee",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.BulkAssignees"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The created assingees object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTaskAssginee"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid assignee object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees/{userID}": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Un-assign a user from a task.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Delete an assignee",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Assignee user ID",
|
||||
"name": "userID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The assignee was successfully deleted.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not allowed to delete the assignee.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{task}/labels": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -3503,6 +3686,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.BulkAssignees": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assignees": {
|
||||
"description": "A list with all assignees",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.BulkTask": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -3781,6 +3976,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ListTaskAssginee": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ListUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -4067,6 +4273,10 @@
|
||||
"team_id": {
|
||||
"description": "The team id.",
|
||||
"type": "integer"
|
||||
},
|
||||
"updated": {
|
||||
"description": "A unix timestamp when this relation was last updated. You cannot change this value.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -21,6 +21,14 @@ definitions:
|
||||
minLength: 3
|
||||
type: string
|
||||
type: object
|
||||
models.BulkAssignees:
|
||||
properties:
|
||||
assignees:
|
||||
description: A list with all assignees
|
||||
items:
|
||||
$ref: '#/definitions/models.User'
|
||||
type: array
|
||||
type: object
|
||||
models.BulkTask:
|
||||
properties:
|
||||
assignees:
|
||||
@ -244,6 +252,13 @@ definitions:
|
||||
change this value.
|
||||
type: integer
|
||||
type: object
|
||||
models.ListTaskAssginee:
|
||||
properties:
|
||||
created:
|
||||
type: integer
|
||||
user_id:
|
||||
type: integer
|
||||
type: object
|
||||
models.ListUser:
|
||||
properties:
|
||||
created:
|
||||
@ -475,6 +490,10 @@ definitions:
|
||||
team_id:
|
||||
description: The team id.
|
||||
type: integer
|
||||
updated:
|
||||
description: A unix timestamp when this relation was last updated. You cannot
|
||||
change this value.
|
||||
type: integer
|
||||
type: object
|
||||
models.TeamUser:
|
||||
properties:
|
||||
@ -2341,6 +2360,130 @@ paths:
|
||||
summary: Remove a label from a task
|
||||
tags:
|
||||
- labels
|
||||
/tasks/{taskID}/assignees:
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Adds a new assignee to a task. The assignee needs to have access
|
||||
to the list, the doer must be able to edit this task.
|
||||
parameters:
|
||||
- description: The assingee object
|
||||
in: body
|
||||
name: assignee
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTaskAssginee'
|
||||
type: object
|
||||
- description: Task ID
|
||||
in: path
|
||||
name: taskID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The created assingee object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTaskAssginee'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid assignee object provided.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Add a new assignee to a task
|
||||
tags:
|
||||
- assignees
|
||||
/tasks/{taskID}/assignees/{userID}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Un-assign a user from a task.
|
||||
parameters:
|
||||
- description: Task ID
|
||||
in: path
|
||||
name: taskID
|
||||
required: true
|
||||
type: integer
|
||||
- description: Assignee user ID
|
||||
in: path
|
||||
name: userID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The assignee was successfully deleted.
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
"403":
|
||||
description: Not allowed to delete the assignee.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Delete an assignee
|
||||
tags:
|
||||
- assignees
|
||||
/tasks/{taskID}/assignees/bulk:
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Adds new assignees to a task. The assignee needs to have access
|
||||
to the list, the doer must be able to edit this task. Every user not in the
|
||||
list will be unassigned from the task, pass an empty array to unassign everyone.
|
||||
parameters:
|
||||
- description: The array of assignees
|
||||
in: body
|
||||
name: assignee
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.BulkAssignees'
|
||||
type: object
|
||||
- description: Task ID
|
||||
in: path
|
||||
name: taskID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The created assingees object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTaskAssginee'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid assignee object provided.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Add new assignees to a task
|
||||
tags:
|
||||
- assignees
|
||||
/tasks/all:
|
||||
get:
|
||||
consumes:
|
||||
|
Reference in New Issue
Block a user