chore: build
This commit is contained in:
@@ -969,7 +969,7 @@ export const getMyPointsRewards = async (): Promise<{
|
||||
}
|
||||
};
|
||||
|
||||
export const claimMyReward = async (poolKey: string): Promise<{
|
||||
export const claimMyReward = async (poolKey: string, productId?: number): Promise<{
|
||||
success: boolean;
|
||||
description?: string;
|
||||
remaining_rewards?: number;
|
||||
@@ -978,7 +978,9 @@ export const claimMyReward = async (poolKey: string): Promise<{
|
||||
error?: string;
|
||||
}> => {
|
||||
try {
|
||||
const { data } = await apiClient.post(`${V1}/points/claim`, { pool_key: poolKey });
|
||||
const body: { pool_key: string; product_id?: number } = { pool_key: poolKey };
|
||||
if (productId !== undefined) body.product_id = productId;
|
||||
const { data } = await apiClient.post(`${V1}/points/claim`, body);
|
||||
return {
|
||||
success: true,
|
||||
description: data.description,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// ============================================
|
||||
// api/api_TYPES.ts - TOUTES LES INTERFACES
|
||||
// ============================================
|
||||
// Interfaces complètes pour le frontend
|
||||
// À importer dans les composants
|
||||
|
||||
export interface ApiResponse {
|
||||
success: boolean;
|
||||
|
||||
Reference in New Issue
Block a user