hunk.code_window:       },
       );
       const isAuthenticated = await this.validatePassword(user.password, loginCredential.password, user.salt);
  
hunk.labels: keep keep add keep keep
hunk.after_edit:     if (!user) {
         return null;
       }
  
hunk.file_path: server/apps/immich/src/api-v1/auth/auth.service.ts
hunk.type: add
file: import { createParamDecorator, ExecutionContext, UnauthorizedException } from '@nestjs/common';
  import { UserEntity } from '@app/database/entities/user.entity';
  // import { AuthUserDto } from './dto/auth-user.dto';
  
  export class AuthUserDto {
    id: string;
    email: string;
  }
  
  export const GetAuthUser = createParamDecorator((data, ctx: ExecutionContext): AuthUserDto => {
    const req = ctx.switchToHttp().getRequest();
  
    const { id, email } = req.user as UserEntity;
  
    const authUser: any = {
      id: id.toString(),
      email,
    };
  
    return authUser;
  });
  