Release 0.5.2
This commit is contained in:
1 parent
fb24d171ae
commit
25da870601
10 files changed
+1308
-298
No files matched your search
@@ -12,9 +12,9 @@ export const actions = {
|
||||
capture: async ({ locals, request }) => {
|
||||
requireUser(locals.user);
|
||||
const data = await request.formData();
|
||||
let id: string;
|
||||
try {
|
||||
const id = captureInbox(String(data.get('title') || ''), String(data.get('url') || ''));
|
||||
redirect(303, `/fundus/${id}`);
|
||||
id = captureInbox(String(data.get('title') || ''), String(data.get('url') || ''));
|
||||
} catch (cause) {
|
||||
const code = cause instanceof Error ? cause.message : '';
|
||||
return fail(400, {
|
||||
@@ -26,5 +26,6 @@ export const actions = {
|
||||
: 'Ein Titel ist erforderlich.'
|
||||
});
|
||||
}
|
||||
redirect(303, `/fundus/${id}`);
|
||||
}
|
||||
} satisfies Actions;
|
||||
Reference in new issue
Block a user