This commit is contained in:
16
front/src/pages/account/index.astro
Normal file
16
front/src/pages/account/index.astro
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
import Layout from 'layouts/Layout.astro';
|
||||
import { getUser } from 'libs/AuthUtils';
|
||||
|
||||
|
||||
const user = await getUser(Astro.cookies);
|
||||
|
||||
if(!user){
|
||||
return Astro.redirect("/account/login");
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
<Layout title="Account setting">
|
||||
<h1>Bonjour {user.name}</h1>
|
||||
</Layout>
|
Reference in New Issue
Block a user