mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Add routes for storing/retrieving client settings
This commit is contained in:
@ -1185,6 +1185,68 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/BasicResult"
|
||||
|
||||
/sec/clientSettings/{clientId}:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/clientId"
|
||||
get:
|
||||
tags: [ Client Settings ]
|
||||
summary: Return the current user settings
|
||||
description: |
|
||||
Returns the settings for the current user. The `clientId` is
|
||||
an identifier to a client application. It returns a JSON
|
||||
structure. The server doesn't care about the actual data,
|
||||
since it is meant to be interpreted by clients.
|
||||
security:
|
||||
- authTokenHeader: []
|
||||
responses:
|
||||
200:
|
||||
description: Ok
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
put:
|
||||
tags: [ Client Settings ]
|
||||
summary: Update current user settings
|
||||
description: |
|
||||
Updates (replaces or creates) the current user's settings with
|
||||
the given data. The `clientId` is an identifier to a client
|
||||
application. The request body is expected to be JSON, the
|
||||
structure is not important to the server.
|
||||
|
||||
The data is stored for the current user and given `clientId`.
|
||||
|
||||
The data is only saved without being checked in any way
|
||||
(besides being valid JSON). It is returned "as is" to the
|
||||
client in the corresponding GET endpoint.
|
||||
security:
|
||||
- authTokenHeader: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
responses:
|
||||
200:
|
||||
description: Ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/BasicResult"
|
||||
delete:
|
||||
tags: [ Client Settings ]
|
||||
summary: Clears the current user settings
|
||||
description: |
|
||||
Removes all stored user settings for the client identified by
|
||||
`clientId`.
|
||||
security:
|
||||
- authTokenHeader: []
|
||||
responses:
|
||||
200:
|
||||
description: Ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/BasicResult"
|
||||
|
||||
/admin/user/resetPassword:
|
||||
post:
|
||||
tags: [ Collective, Admin ]
|
||||
@ -5571,3 +5633,11 @@ components:
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
clientId:
|
||||
name: clientId
|
||||
in: path
|
||||
required: true
|
||||
description: |
|
||||
some identifier for a client application
|
||||
schema:
|
||||
type: string
|
||||
|
Reference in New Issue
Block a user