Add name field to users
This commit is contained in:
@ -5911,7 +5911,7 @@ var doc = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1.UserAvatarProvider"
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@ -6041,6 +6041,57 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/settings/name": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Changes the current user's name. It is also possible to reset the name.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"user"
|
||||
],
|
||||
"summary": "Change the current user's name",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The updated user name",
|
||||
"name": "avatar",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1.UserName"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Something's invalid.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/settings/totp": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -7406,6 +7457,10 @@ var doc = `{
|
||||
"description": "The unique, numeric id of this user.",
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"description": "The full name of the user.",
|
||||
"type": "string"
|
||||
},
|
||||
"updated": {
|
||||
"description": "A timestamp when this task was last updated. You cannot change this value.",
|
||||
"type": "string"
|
||||
@ -7475,6 +7530,10 @@ var doc = `{
|
||||
"description": "The unique, numeric id of this user.",
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"description": "The full name of the user.",
|
||||
"type": "string"
|
||||
},
|
||||
"right": {
|
||||
"type": "integer"
|
||||
},
|
||||
@ -7653,6 +7712,10 @@ var doc = `{
|
||||
"description": "The unique, numeric id of this user.",
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"description": "The full name of the user.",
|
||||
"type": "string"
|
||||
},
|
||||
"updated": {
|
||||
"description": "A timestamp when this task was last updated. You cannot change this value.",
|
||||
"type": "string"
|
||||
@ -7669,6 +7732,16 @@ var doc = `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"avatar_provider": {
|
||||
"description": "The avatar provider. Valid types are ` + "`" + `gravatar` + "`" + ` (uses the user email), ` + "`" + `upload` + "`" + `, ` + "`" + `initials` + "`" + `, ` + "`" + `default` + "`" + `.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.UserName": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The new name of the current user.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
@ -5894,7 +5894,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1.UserAvatarProvider"
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@ -6024,6 +6024,57 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/settings/name": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Changes the current user's name. It is also possible to reset the name.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"user"
|
||||
],
|
||||
"summary": "Change the current user's name",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The updated user name",
|
||||
"name": "avatar",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1.UserName"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Something's invalid.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/settings/totp": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -7389,6 +7440,10 @@
|
||||
"description": "The unique, numeric id of this user.",
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"description": "The full name of the user.",
|
||||
"type": "string"
|
||||
},
|
||||
"updated": {
|
||||
"description": "A timestamp when this task was last updated. You cannot change this value.",
|
||||
"type": "string"
|
||||
@ -7458,6 +7513,10 @@
|
||||
"description": "The unique, numeric id of this user.",
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"description": "The full name of the user.",
|
||||
"type": "string"
|
||||
},
|
||||
"right": {
|
||||
"type": "integer"
|
||||
},
|
||||
@ -7636,6 +7695,10 @@
|
||||
"description": "The unique, numeric id of this user.",
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"description": "The full name of the user.",
|
||||
"type": "string"
|
||||
},
|
||||
"updated": {
|
||||
"description": "A timestamp when this task was last updated. You cannot change this value.",
|
||||
"type": "string"
|
||||
@ -7652,6 +7715,16 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"avatar_provider": {
|
||||
"description": "The avatar provider. Valid types are `gravatar` (uses the user email), `upload`, `initials`, `default`.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.UserName": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The new name of the current user.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
@ -738,6 +738,9 @@ definitions:
|
||||
id:
|
||||
description: The unique, numeric id of this user.
|
||||
type: integer
|
||||
name:
|
||||
description: The full name of the user.
|
||||
type: string
|
||||
updated:
|
||||
description: A timestamp when this task was last updated. You cannot change this value.
|
||||
type: string
|
||||
@ -789,6 +792,9 @@ definitions:
|
||||
id:
|
||||
description: The unique, numeric id of this user.
|
||||
type: integer
|
||||
name:
|
||||
description: The full name of the user.
|
||||
type: string
|
||||
right:
|
||||
type: integer
|
||||
updated:
|
||||
@ -913,6 +919,9 @@ definitions:
|
||||
id:
|
||||
description: The unique, numeric id of this user.
|
||||
type: integer
|
||||
name:
|
||||
description: The full name of the user.
|
||||
type: string
|
||||
updated:
|
||||
description: A timestamp when this task was last updated. You cannot change this value.
|
||||
type: string
|
||||
@ -925,6 +934,13 @@ definitions:
|
||||
v1.UserAvatarProvider:
|
||||
properties:
|
||||
avatar_provider:
|
||||
description: The avatar provider. Valid types are `gravatar` (uses the user email), `upload`, `initials`, `default`.
|
||||
type: string
|
||||
type: object
|
||||
v1.UserName:
|
||||
properties:
|
||||
name:
|
||||
description: The new name of the current user.
|
||||
type: string
|
||||
type: object
|
||||
v1.UserPassword:
|
||||
@ -4830,7 +4846,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/v1.UserAvatarProvider'
|
||||
$ref: '#/definitions/models.Message'
|
||||
"400":
|
||||
description: Something's invalid.
|
||||
schema:
|
||||
@ -4915,6 +4931,38 @@ paths:
|
||||
summary: Update email address
|
||||
tags:
|
||||
- user
|
||||
/user/settings/name:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Changes the current user's name. It is also possible to reset the name.
|
||||
parameters:
|
||||
- description: The updated user name
|
||||
in: body
|
||||
name: avatar
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/v1.UserName'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
"400":
|
||||
description: Something's invalid.
|
||||
schema:
|
||||
$ref: '#/definitions/web.HTTPError'
|
||||
"500":
|
||||
description: Internal server error.
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Change the current user's name
|
||||
tags:
|
||||
- user
|
||||
/user/settings/totp:
|
||||
get:
|
||||
consumes:
|
||||
|
Reference in New Issue
Block a user