chore: fix
This commit is contained in:
@@ -531,6 +531,22 @@ export const getClientReferralAdmin = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const resetClientReferral = async (
|
||||
username: string,
|
||||
): Promise<{ success: boolean; message?: string }> => {
|
||||
try {
|
||||
const { data } = await apiClient.delete(
|
||||
`${V2}/admin/protected/client/${username}/referral/reset`,
|
||||
);
|
||||
return { success: true, message: data.message };
|
||||
} catch (error: any) {
|
||||
return {
|
||||
success: false,
|
||||
message: error.response?.data?.error || "Erreur reset parrainage",
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export interface CancelledOrder {
|
||||
id: number;
|
||||
username: string;
|
||||
|
||||
@@ -35,11 +35,16 @@ export interface ClientResponse {
|
||||
|
||||
export interface CommandResponse {
|
||||
id: number;
|
||||
client_order_number?: number;
|
||||
username: string;
|
||||
status: string;
|
||||
adresse: string;
|
||||
total_prix: number;
|
||||
livreur_assign?: string | null;
|
||||
proposed_address?: string | null;
|
||||
address_proposal_status?: string;
|
||||
referral_used?: number;
|
||||
cancel_reason?: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user