Skip to content

Commit

Permalink
fix: check userId instead instanceof
Browse files Browse the repository at this point in the history
  • Loading branch information
ChingCdesu committed Oct 1, 2023
1 parent c7f2758 commit 6522353
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "supernode",
"version": "1.0.0-alpha.11",
"version": "1.0.0-alpha.12",
"description": "",
"author": "",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion src/common/middlewares/user.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class UserMiddleware implements NestMiddleware {
private readonly _userModel: typeof User,
) {}
use(req: Request, res: Response, next: NextFunction) {
if (!req.user || req.user instanceof User) {
if (!req.user || req.user.id) {
next();
return;
}
Expand Down

0 comments on commit 6522353

Please sign in to comment.