chore: add push notif
This commit is contained in:
@@ -777,6 +777,22 @@ export const getPublicSettings = async (): Promise<PublicSettings> => {
|
||||
}
|
||||
};
|
||||
|
||||
export const registerPushToken = async (token: string): Promise<void> => {
|
||||
try {
|
||||
await apiClient.post(`${V1}/push-token`, { token });
|
||||
} catch {
|
||||
// silencieux
|
||||
}
|
||||
};
|
||||
|
||||
export const unregisterPushToken = async (): Promise<void> => {
|
||||
try {
|
||||
await apiClient.delete(`${V1}/push-token`);
|
||||
} catch {
|
||||
// silencieux
|
||||
}
|
||||
};
|
||||
|
||||
export const calculateOrderTotal = (order: any): number => {
|
||||
if (typeof order.total === "number" && order.total > 0) return order.total;
|
||||
if (typeof order.total_prix === "number" && order.total_prix > 0)
|
||||
|
||||
Reference in New Issue
Block a user