Compare commits

..

1 Commits

Author SHA1 Message Date
Xiyuan Chen
70571b53ad fix: use query param for delete method (#30206) 2025-12-29 21:48:54 -08:00
2 changed files with 6 additions and 6 deletions

View File

@@ -110,5 +110,5 @@ class EnterpriseService:
if not app_id:
raise ValueError("app_id must be provided.")
body = {"appId": app_id}
EnterpriseRequest.send_request("DELETE", "/webapp/clean", json=body)
params = {"appId": app_id}
EnterpriseRequest.send_request("DELETE", "/webapp/clean", params=params)

View File

@@ -1,6 +1,7 @@
import type { Locale } from '.'
import type { Namespace } from './i18next-config'
import type { KeyPrefix, Namespace } from './i18next-config'
import { match } from '@formatjs/intl-localematcher'
import { camelCase } from 'es-toolkit/compat'
import { createInstance } from 'i18next'
import resourcesToBackend from 'i18next-resources-to-backend'
import Negotiator from 'negotiator'
@@ -22,11 +23,10 @@ const initI18next = async (lng: Locale, ns: Namespace) => {
return i18nInstance
}
export async function getTranslation(lng: Locale, ns: Namespace, options: Record<string, any> = {}) {
export async function getTranslation(lng: Locale, ns: Namespace) {
const i18nextInstance = await initI18next(lng, ns)
return {
// @ts-expect-error types mismatch
t: i18nextInstance.getFixedT(lng, ns, options.keyPrefix),
t: i18nextInstance.getFixedT(lng, 'translation', camelCase(ns) as KeyPrefix),
i18n: i18nextInstance,
}
}