mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-11-05 07:20:13 +01:00
fix: error in logs if "allow unauthenticated shares" is enabled
This commit is contained in:
parent
6d87e20e29
commit
c6d8188e4e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user