Release 0.7.0
This commit is contained in:
1 parent
d586fbd8ce
commit
6d96900d81
27 files changed
+2060
-25
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import type { RequestHandler } from './$types';
|
||||
import { apiFailure } from '#lib/server/api-http.js';
|
||||
import { getShow } from '#lib/server/shows.js';
|
||||
import { authenticateTechnical } from '#lib/server/technical-access.js';
|
||||
|
||||
export const GET: RequestHandler = ({ request, params }) => {
|
||||
try {
|
||||
authenticateTechnical(request);
|
||||
const show = getShow(params.id);
|
||||
if (!show) throw new Error('NOT_FOUND');
|
||||
return json({ data: show });
|
||||
} catch (cause) {
|
||||
return apiFailure(cause);
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user