view data fixes
This commit is contained in:
@@ -22,12 +22,16 @@ export class AcceptSponsorshipRequestMutation
|
||||
async execute(
|
||||
command: AcceptSponsorshipRequestCommand,
|
||||
): Promise<Result<void, AcceptSponsorshipRequestMutationError>> {
|
||||
const result = await this.service.acceptRequest(command);
|
||||
|
||||
if (result.isErr()) {
|
||||
try {
|
||||
const result = await this.service.acceptRequest(command);
|
||||
|
||||
if (result.isErr()) {
|
||||
return Result.err('ACCEPT_SPONSORSHIP_REQUEST_FAILED');
|
||||
}
|
||||
|
||||
return Result.ok(undefined);
|
||||
} catch (error) {
|
||||
return Result.err('ACCEPT_SPONSORSHIP_REQUEST_FAILED');
|
||||
}
|
||||
|
||||
return Result.ok(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user