mirror of
https://github.com/BradNut/weddingsite
synced 2025-09-08 17:40:36 +00:00
Fixing pulling user from session.
This commit is contained in:
parent
5971fd1b6b
commit
e979a83dca
3 changed files with 3 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ export default withSession(async (req, res) => {
|
|||
session,
|
||||
} = req;
|
||||
|
||||
const user = session.get('user');
|
||||
const { user } = session;
|
||||
|
||||
if (!user?.isLoggedIn) {
|
||||
res.status(401).end();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default withSession(async (req, res) => {
|
|||
session,
|
||||
} = req;
|
||||
|
||||
const user = session.get('user');
|
||||
const { user } = session;
|
||||
|
||||
if (!user?.isLoggedIn) {
|
||||
res.status(401).end();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const protectedRoutes = [`${rootDomain}/register`, `${rootDomain}/createguest`];
|
|||
export default async function permissions(req, res) {
|
||||
const { method, session } = req;
|
||||
|
||||
const user = session.get('user');
|
||||
const { user } = session;
|
||||
|
||||
if (!user?.isLoggedIn) {
|
||||
res.status(401).end();
|
||||
|
|
|
|||
Loading…
Reference in a new issue