chore: build

This commit is contained in:
2026-06-13 15:22:51 +02:00
parent dd861fd7be
commit 59d4f89a14
9 changed files with 198 additions and 41 deletions
+6 -1
View File
@@ -235,8 +235,11 @@ export const updateCommandAddress = async (
export const validateCommand = async (commandId: number) => {
const { data } = await apiClient.post(
`${V2}/admin/protected/orders/${commandId}/force-validate`,
{ command_id: commandId },
);
return { success: true, message: data.message };
const validated = (data.validated ?? []) as { command_id: number; points_awarded: number }[];
const points = validated.find((v) => v.command_id === commandId)?.points_awarded ?? 0;
return { success: true, points_awarded: points, validated_count: data.validated_count ?? 0 };
};
export const proposeAddressChangeAdmin = async (
@@ -937,6 +940,8 @@ export interface PointsReward {
type: "free_product" | "half_price_product" | "custom";
description: string;
category_configs: RewardCategoryConfig[];
reward_product_id?: number;
reward_quantity?: number;
}
export interface PointsPool {