chore: fix
This commit is contained in:
@@ -663,10 +663,15 @@ export const deleteCategoryAdmin = async (
|
||||
|
||||
export interface AppSettings {
|
||||
penalties_enabled: boolean;
|
||||
show_amende_score: boolean;
|
||||
points_enabled: boolean;
|
||||
points_categories_weed: string[];
|
||||
points_categories_zipette: string[];
|
||||
points_separated: boolean;
|
||||
points_weed_threshold_price: number;
|
||||
points_weed_per_threshold: number;
|
||||
points_zipette_threshold_price: number;
|
||||
points_zipette_per_threshold: number;
|
||||
}
|
||||
|
||||
export const getSettings = async (): Promise<{ success: boolean; settings?: AppSettings; error?: string }> => {
|
||||
|
||||
@@ -346,7 +346,9 @@ export const getAllAlerts = async (): Promise<{
|
||||
|
||||
export interface PublicSettings {
|
||||
penalties_enabled: boolean;
|
||||
show_amende_score: boolean;
|
||||
points_enabled: boolean;
|
||||
points_separated: boolean;
|
||||
}
|
||||
|
||||
export const getPublicSettings = async (): Promise<PublicSettings> => {
|
||||
@@ -354,9 +356,11 @@ export const getPublicSettings = async (): Promise<PublicSettings> => {
|
||||
const { data } = await apiClient.get(`http://5.181.0.112/api/v1/app-settings`);
|
||||
return {
|
||||
penalties_enabled: data.penalties_enabled ?? true,
|
||||
show_amende_score: data.show_amende_score ?? true,
|
||||
points_enabled: data.points_enabled ?? true,
|
||||
points_separated: data.points_separated ?? true,
|
||||
};
|
||||
} catch {
|
||||
return { penalties_enabled: true, points_enabled: true };
|
||||
return { penalties_enabled: true, show_amende_score: true, points_enabled: true, points_separated: true };
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user