chore: fix push notif
This commit is contained in:
@@ -768,11 +768,12 @@ export interface PublicSettings {
|
||||
referral_enabled: boolean;
|
||||
pool_names: string[];
|
||||
crypto_payment_enabled: boolean;
|
||||
crypto_only: boolean;
|
||||
nowpayments_currencies: string[];
|
||||
}
|
||||
|
||||
export const getPublicSettings = async (): Promise<PublicSettings> => {
|
||||
const defaults: PublicSettings = { penalties_enabled: true, show_amende_score: true, points_enabled: true, points_separated: true, referral_enabled: true, pool_names: ['Pool 1', 'Pool 2'], crypto_payment_enabled: false, nowpayments_currencies: [] };
|
||||
const defaults: PublicSettings = { penalties_enabled: true, show_amende_score: true, points_enabled: true, points_separated: true, referral_enabled: true, pool_names: ['Pool 1', 'Pool 2'], crypto_payment_enabled: false, crypto_only: false, nowpayments_currencies: [] };
|
||||
try {
|
||||
const { data } = await apiClient.get(`${V1}/app-settings`);
|
||||
return {
|
||||
@@ -785,6 +786,7 @@ export const getPublicSettings = async (): Promise<PublicSettings> => {
|
||||
? data.pool_names
|
||||
: defaults.pool_names,
|
||||
crypto_payment_enabled: data.crypto_payment_enabled ?? false,
|
||||
crypto_only: data.crypto_only ?? false,
|
||||
nowpayments_currencies: Array.isArray(data.nowpayments_currencies) ? data.nowpayments_currencies : [],
|
||||
};
|
||||
} catch {
|
||||
@@ -813,7 +815,7 @@ export const getCryptoPaymentStatus = async (commandId: number): Promise<CryptoP
|
||||
|
||||
export const registerPushToken = async (token: string): Promise<void> => {
|
||||
try {
|
||||
await apiClient.post(`${V1}/push-token`, { token });
|
||||
await apiClient.post(`${V1}/push-token`, { push_token: token });
|
||||
} catch {
|
||||
// silencieux
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user