updateProfile method
Implementation
@override
Future<Either<Failure, Profile>> updateProfile(
{required Profile model}) async {
try {
final param = {
"codeUser": id,
};
Map<String, dynamic> body = model.toMap();
body['customerId'] = id;
final result = await httpHandler.patch(
url: Api.profile.updateProfile,
requestBody: body,
queryParameters: param,
);
return Right(ProfileDto.fromJson(result).jsonResult);
} on Exception catch (error) {
return Left(FailureResponse.mapExceptionToFailure(error));
}
}