feat(api): public settings route (#57)

adds public settings route that provides initalized value to check if the app has been configured
for the first time
This commit is contained in:
sct
2020-09-07 18:41:20 +09:00
committed by GitHub
parent fcaabcb428
commit c0166e7ecb
4 changed files with 48 additions and 3 deletions

View File

@@ -184,6 +184,12 @@ components:
- activeDirectory
- is4k
- enableSeasonFolders
PublicSettings:
type: object
properties:
initialized:
type: boolean
example: false
AllSettings:
type: object
properties:
@@ -199,11 +205,14 @@ components:
type: array
items:
$ref: '#/components/schemas/SonarrSettings'
public:
$ref: '#/components/schemas/PublicSettings'
required:
- main
- plex
- radarr
- sonarr
- public
securitySchemes:
cookieAuth:
@@ -430,6 +439,19 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/SonarrSettings'
/settings/public:
get:
summary: Returns public settings
description: Returns settings that are not protected or sensitive. Mainly used to determine if the app has been configured for the first time.
tags:
- settings
responses:
'200':
description: Public Settings returned
content:
application/json:
schema:
$ref: '#/components/schemas/PublicSettings'
/auth/me:
get:
summary: Returns the currently logged in user