mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat: send language in payment requests for localized descriptions
- Add language field to balance topup and landing purchase requests - Cap news article featured image height with max-h-96 Cherry-picked from PR #362 (without favicon change — files don't exist)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import apiClient from './client';
|
||||
import i18n from '../i18n';
|
||||
import type {
|
||||
Balance,
|
||||
Transaction,
|
||||
@@ -54,6 +55,7 @@ export const balanceApi = {
|
||||
amount_kopeks: number;
|
||||
payment_method: string;
|
||||
payment_option?: string;
|
||||
language?: string;
|
||||
} = {
|
||||
amount_kopeks: amountKopeks,
|
||||
payment_method: paymentMethod,
|
||||
@@ -61,6 +63,7 @@ export const balanceApi = {
|
||||
if (paymentOption) {
|
||||
payload.payment_option = paymentOption;
|
||||
}
|
||||
payload.language = i18n.language || 'ru';
|
||||
const response = await apiClient.post('/cabinet/balance/topup', payload);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -101,6 +101,7 @@ export interface PurchaseRequest {
|
||||
gift_recipient_type?: 'email' | 'telegram';
|
||||
gift_recipient_value?: string;
|
||||
gift_message?: string;
|
||||
language?: string;
|
||||
}
|
||||
|
||||
export interface PurchaseResponse {
|
||||
|
||||
Reference in New Issue
Block a user