harden media

This commit is contained in:
2025-12-31 15:39:28 +01:00
parent 92226800df
commit 8260bf7baf
413 changed files with 8361 additions and 1544 deletions

View File

@@ -166,6 +166,16 @@ export class MediaService {
async updateAvatar(driverId: string, input: UpdateAvatarInput): Promise<UpdateAvatarOutputDTO> {
this.logger.debug(`[MediaService] Updating avatar for driver: ${driverId}`);
// Handle null avatarUrl - this would mean removing the avatar
if (input.avatarUrl === null) {
// For now, we'll treat null as an error since the use case requires a URL
// In a complete implementation, this would trigger avatar removal
return {
success: false,
error: 'Avatar URL cannot be null',
};
}
const result = await this.updateAvatarUseCase.execute({
driverId,
mediaUrl: input.avatarUrl,