chore: update

This commit is contained in:
2026-03-14 12:22:38 +01:00
parent 0523ed6356
commit 9d52f3193a
4 changed files with 58 additions and 74 deletions
+9 -2
View File
@@ -74,13 +74,14 @@ export const resetClientPenalties = async (clientUsername: string) => {
return { success: true, message: data.message };
};
// pool: 0 = pool principal (point), 1 = pool secondaire (point_zipette), -1 = tous
export const resetClientPoints = async (
clientUsername: string,
resetCancellationsPoints: boolean = false,
pool: number = -1,
) => {
const { data } = await apiClient.post(
`${API}/client/${clientUsername}/point/reset`,
{ reset_cancellations_points: resetCancellationsPoints },
{ pool },
);
return { success: true, message: data.message };
};
@@ -349,6 +350,8 @@ export interface PublicSettings {
show_amende_score: boolean;
points_enabled: boolean;
points_separated: boolean;
pool_names: string[];
pool_keys: string[];
}
export const registerCabinePushToken = async (
@@ -399,6 +402,8 @@ export const getPublicSettings = async (): Promise<PublicSettings> => {
show_amende_score: data.show_amende_score ?? true,
points_enabled: data.points_enabled ?? true,
points_separated: data.points_separated ?? true,
pool_names: data.pool_names ?? [],
pool_keys: data.pool_keys ?? [],
};
} catch {
return {
@@ -406,6 +411,8 @@ export const getPublicSettings = async (): Promise<PublicSettings> => {
show_amende_score: true,
points_enabled: true,
points_separated: true,
pool_names: [],
pool_keys: [],
};
}
};