website refactor
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import { SponsorshipRequestsService } from '@/lib/services/sponsors/SponsorshipRequestsService';
|
||||
import type { RejectSponsorshipRequestCommand } from '@/lib/services/sponsors/SponsorshipRequestsService';
|
||||
import type { Mutation } from '@/lib/contracts/mutations/Mutation';
|
||||
import { Result } from '@/lib/contracts/Result';
|
||||
import type { Result as ResultType } from '@/lib/contracts/Result';
|
||||
|
||||
export interface RejectSponsorshipRequestCommand {
|
||||
requestId: string;
|
||||
actorDriverId: string;
|
||||
reason: string | null;
|
||||
}
|
||||
|
||||
export type RejectSponsorshipRequestMutationError =
|
||||
| 'REJECT_SPONSORSHIP_REQUEST_FAILED';
|
||||
@@ -18,7 +22,7 @@ export class RejectSponsorshipRequestMutation
|
||||
|
||||
async execute(
|
||||
command: RejectSponsorshipRequestCommand,
|
||||
): Promise<ResultType<void, RejectSponsorshipRequestMutationError>> {
|
||||
): Promise<Result<void, RejectSponsorshipRequestMutationError>> {
|
||||
const result = await this.service.rejectRequest(command);
|
||||
|
||||
if (result.isErr()) {
|
||||
|
||||
Reference in New Issue
Block a user