This commit is contained in:
parent
9a4357394a
commit
f53f19dc93
@ -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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
---
|
---
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user