chore: add parrainage
This commit is contained in:
@@ -351,6 +351,35 @@ export interface PublicSettings {
|
||||
points_separated: boolean;
|
||||
}
|
||||
|
||||
export const registerCabinePushToken = async (pushToken: string): Promise<void> => {
|
||||
try {
|
||||
await apiClient.post(`${API}/push-token`, { push_token: pushToken });
|
||||
} catch { /* ignore */ }
|
||||
};
|
||||
|
||||
export const unregisterCabinePushToken = async (): Promise<void> => {
|
||||
try {
|
||||
await apiClient.delete(`${API}/push-token`);
|
||||
} catch { /* ignore */ }
|
||||
};
|
||||
|
||||
export interface AppNotification {
|
||||
command_id: number;
|
||||
type: string;
|
||||
message: string;
|
||||
created_at: string;
|
||||
read: boolean;
|
||||
}
|
||||
|
||||
export const getCabineNotifications = async (): Promise<{ notifications: AppNotification[]; unread_count: number }> => {
|
||||
const { data } = await apiClient.get(`${API}/notifications`);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const markCabineNotificationsRead = async (): Promise<void> => {
|
||||
await apiClient.post(`${API}/notifications/read`);
|
||||
};
|
||||
|
||||
export const getPublicSettings = async (): Promise<PublicSettings> => {
|
||||
try {
|
||||
const { data } = await apiClient.get(`http://5.181.0.112/api/v1/app-settings`);
|
||||
|
||||
Reference in New Issue
Block a user