Files
immich/web/src/routes/custom.css/+server.ts
Wingy cb0e37e76e fix(web): fix Theme Custom CSS endpoint requiring the user to be logged in as the server admin (#4633)
* fix custom css requiring the user to be the admin and logged in

* move theme api to custom endpoint

* add e2e test
2023-10-25 22:13:05 +00:00

14 lines
324 B
TypeScript

import { RequestHandler, text } from '@sveltejs/kit';
export const GET = (async ({ locals: { api } }) => {
const {
data: {
theme: { customCss },
},
} = await api.serverInfoApi.getTheme();
return text(customCss, {
headers: {
'Content-Type': 'text/css',
},
});
}) satisfies RequestHandler;