Enhance adventure management: add error handling for category fetch, implement unique email constraint in user model, and update adventure save logic to ensure category assignment

This commit is contained in:
Sean Morley
2024-11-22 17:03:02 -05:00
parent 86d213bb8b
commit 736ede2417
15 changed files with 216 additions and 60 deletions

View File

@@ -39,14 +39,6 @@ export const actions: Actions = {
const serverEndpoint = PUBLIC_SERVER_URL || 'http://localhost:8000';
const csrfTokenFetch = await event.fetch(`${serverEndpoint}/csrf/`);
// console log each form data
console.log('username: ', username);
console.log('password1: ', password1);
console.log('password2: ', password2);
console.log('email: ', email);
console.log('first_name: ', first_name);
console.log('last_name: ', last_name);
if (!csrfTokenFetch.ok) {
event.locals.user = null;
return fail(500, { message: 'Failed to fetch CSRF token' });