Added e-mail alert settings, saveable but not integrated yet.

This commit is contained in:
2026-07-18 06:24:07 +02:00
parent 479b044798
commit 216e7f59ef
18 changed files with 231 additions and 75 deletions

View File

@@ -37,6 +37,7 @@ import { fetchMoviesApi } from './movies.js';
import initRestrictionHandler from './restrictions.js';
import { scenesRouter } from './scenes.js';
import serializeApiResponses from './serialize.js';
import { router as stashesRouter } from './stashes.js';
import { syncRouter } from './sync.js';
@@ -123,6 +124,8 @@ export default async function initServer() {
res.sendFile(path.join(import.meta.dirname, '../../assets/consent.html'));
});
router.use('/api/{*splat}', serializeApiResponses);
router.use('/api/{*splat}', async (req, _res, next) => {
if (req.headers['api-user']) {
req.user = await verifyKey(req.headers['api-user'], req.headers['api-key'], req);