resolve todos in website and api
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import { RequestAvatarGenerationInputDTO } from '@/lib/types/generated/RequestAvatarGenerationInputDTO';
|
||||
import { UpdateAvatarInputDTO } from '@/lib/types/generated/UpdateAvatarInputDTO';
|
||||
import { AvatarViewModel } from '@/lib/view-models/AvatarViewModel';
|
||||
import { RequestAvatarGenerationViewModel } from '@/lib/view-models/RequestAvatarGenerationViewModel';
|
||||
import { UpdateAvatarViewModel } from '@/lib/view-models/UpdateAvatarViewModel';
|
||||
import type { MediaApiClient } from '../../api/media/MediaApiClient';
|
||||
|
||||
// TODO: Move these types to apps/website/lib/types/generated when available
|
||||
type UpdateAvatarInputDto = { driverId: string; avatarUrl: string };
|
||||
|
||||
/**
|
||||
* Avatar Service
|
||||
*
|
||||
@@ -37,7 +35,7 @@ export class AvatarService {
|
||||
/**
|
||||
* Update avatar for driver with view model transformation
|
||||
*/
|
||||
async updateAvatar(input: UpdateAvatarInputDto): Promise<UpdateAvatarViewModel> {
|
||||
async updateAvatar(input: UpdateAvatarInputDTO): Promise<UpdateAvatarViewModel> {
|
||||
const dto = await this.apiClient.updateAvatar(input);
|
||||
return new UpdateAvatarViewModel(dto);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ import { MediaViewModel } from '@/lib/view-models/MediaViewModel';
|
||||
import { UploadMediaViewModel } from '@/lib/view-models/UploadMediaViewModel';
|
||||
import type { MediaApiClient } from '../../api/media/MediaApiClient';
|
||||
|
||||
// TODO: Move these types to apps/website/lib/types/generated when available
|
||||
type UploadMediaInputDto = { file: File; type: string; category?: string };
|
||||
// Local request shape mirroring the media upload API contract until a generated type is available
|
||||
type UploadMediaRequest = { file: File; type: string; category?: string };
|
||||
|
||||
/**
|
||||
* Media Service
|
||||
@@ -20,7 +20,7 @@ export class MediaService {
|
||||
/**
|
||||
* Upload media file with view model transformation
|
||||
*/
|
||||
async uploadMedia(input: UploadMediaInputDto): Promise<UploadMediaViewModel> {
|
||||
async uploadMedia(input: UploadMediaRequest): Promise<UploadMediaViewModel> {
|
||||
const dto = await this.apiClient.uploadMedia(input);
|
||||
return new UploadMediaViewModel(dto);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user