feat(server,web): server config (#4006)

* feat: server config

* chore: open api

* fix: redirect /map to /photos when disabled
This commit is contained in:
Jason Rasmussen 2023-09-08 22:51:46 -04:00 committed by GitHub
parent 3edade6761
commit f1db257628
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 1103 additions and 162 deletions

View file

@ -83,6 +83,7 @@ describe(`${ServerInfoController.name} (e2e)`, () => {
clipEncode: true,
configFile: false,
facialRecognition: true,
map: true,
oauth: false,
oauthAutoLaunch: false,
passwordLogin: true,
@ -93,6 +94,18 @@ describe(`${ServerInfoController.name} (e2e)`, () => {
});
});
describe('GET /server-info/config', () => {
it('should respond with the server configuration', async () => {
const { status, body } = await request(server).get('/server-info/config');
expect(status).toBe(200);
expect(body).toEqual({
loginPageMessage: '',
oauthButtonText: 'Login with OAuth',
mapTileUrl: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
});
});
});
describe('GET /server-info/stats', () => {
it('should require authentication', async () => {
const { status, body } = await request(server).get('/server-info/stats');