mirror of
https://github.com/WonderAliceUwU/OmniArr.git
synced 2026-11-25 19:35:56 +00:00
feature: add calendar
This commit is contained in:
1 parent
7953a258d4
commit
eaa0ede2ec
6 files changed
+621
-12
No files matched your search
@@ -14,6 +14,7 @@ import {
|
||||
import { decryptJson, deriveEncryptionKey, encryptJson, randomToken, verifyPassword, createPasswordRecord } from './lib/security.js';
|
||||
import { loadState, readAdmin, readEncryptedConfig, saveAdminAndConfig, updateEncryptedConfig } from './lib/store.js';
|
||||
import {
|
||||
getCalendar,
|
||||
getConnectionStatuses,
|
||||
getDashboard,
|
||||
getDownloads,
|
||||
@@ -230,6 +231,12 @@ async function routeRequest(request: IncomingMessage, response: ServerResponse):
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.pathname === '/api/calendar' && method === 'GET') {
|
||||
const config = await readConfig(session!.encryptionKey);
|
||||
sendJson(response, 200, await getCalendar(config));
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.pathname === '/api/title-details' && method === 'POST') {
|
||||
const config = await readConfig(session!.encryptionKey);
|
||||
const body = await readJson<TitleDetailsRequest>(request);
|
||||
|
||||
Reference in new issue
Block a user