Skip to content

Commit

Permalink
Merge pull request #295 from cotype/feature/userNameInCookie
Browse files Browse the repository at this point in the history
feat(core): add username to cookie
  • Loading branch information
mo-hh234 authored Mar 25, 2021
2 parents 4bdd632 + c460ed8 commit f9384e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/auth/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default async (
if (!valid) return res.status(403).end();
if (!req.session) throw new Error("No session middleware");
req.session.userId = String(user.id);
req.session.userName = String(user.name);
res.status(204).end();
});

Expand Down

0 comments on commit f9384e5

Please sign in to comment.