add some log
All checks were successful
Build Docker Image / run (pull_request) Successful in 51s

This commit is contained in:
Clement 2024-04-27 18:59:52 +02:00
parent 9a4357394a
commit f53f19dc93
2 changed files with 4 additions and 2 deletions

View File

@ -21,10 +21,12 @@ const res = await AstroUtils.wrap(async () => {
} }
try { try {
pb.collection('users').authWithPassword(request.user,request.password); await pb.collection('users').authWithPassword(request.user,request.password);
return Astro.redirect("/account") return Astro.redirect("/account")
} catch (error) { } catch (error) {
console.log(error) console.log(error)
console.warn('user password is incorrect')
return Astro.redirect("/account/login");// route('/account/login', {message: 'Compte invalide, valider les identifiants'})) //XXX: comprendre comment le system de route fonctionne
} }
}) })
--- ---

View File

@ -24,7 +24,7 @@ await AstroUtils.wrap(async () => {
} }
try{ try{
await pb.collection('users').create(request) await pb.collection('users').create(request)
return Astro.redirect('account/login') return Astro.redirect('/account/login')
}catch(e){ }catch(e){
console.log(e); console.log(e);
} }