Skip to content

Commit

Permalink
fix: error in logs if "allow unauthenticated shares" is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith404 committed Mar 25, 2024
1 parent 6d87e20 commit c6d8188
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/user/user.controller.ts
Expand Up @@ -27,7 +27,8 @@ export class UserController {
// Own user operations
@Get("me")
@UseGuards(JwtGuard)
async getCurrentUser(@GetUser() user: User) {
async getCurrentUser(@GetUser() user?: User) {
if (!user) return null;
const userDTO = new UserDTO().from(user);
userDTO.hasPassword = !!user.password;
return userDTO;
Expand Down

0 comments on commit c6d8188

Please sign in to comment.