Add library push to website from the content editor
This commit is contained in:
1 parent
ec57bd73b3
commit
0f90babb7a
13 files changed
+281
-20
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { exportLibrary } from '#lib/server/library';
|
||||
import { requireApiKey } from '#lib/server/library/auth';
|
||||
import type { RequestHandler } from './$types';
|
||||
|
||||
export const GET: RequestHandler = async ({ request }) => {
|
||||
requireApiKey(request);
|
||||
return json(await exportLibrary(), { headers: { 'Cache-Control': 'no-store' } });
|
||||
};
|
||||
Reference in new issue
Block a user