refactor
This commit is contained in:
@@ -11,9 +11,7 @@ export type UpdateDriverProfileInput = {
|
||||
country?: string;
|
||||
};
|
||||
|
||||
export type UpdateDriverProfileResult = {
|
||||
driverId: string;
|
||||
};
|
||||
export type UpdateDriverProfileResult = Driver;
|
||||
|
||||
export type UpdateDriverProfileErrorCode =
|
||||
| 'DRIVER_NOT_FOUND'
|
||||
@@ -64,11 +62,7 @@ export class UpdateDriverProfileUseCase implements UseCase<UpdateDriverProfileIn
|
||||
|
||||
await this.driverRepository.update(updated);
|
||||
|
||||
const result: UpdateDriverProfileResult = {
|
||||
driverId: updated.id,
|
||||
};
|
||||
|
||||
this.output.present(result);
|
||||
this.output.present(updated);
|
||||
|
||||
return Result.ok(undefined);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user