14 lines
587 B
TypeScript
14 lines
587 B
TypeScript
|
|
import { request } from '../request';
|
||
|
|
|
||
|
|
export function fetchGetI18nEntries(params?: { keyword?: string }) {
|
||
|
|
return request<{ items: Api.Www.I18nEntry[]; total: number }>({ url: '/www/i18n', method: 'get', params });
|
||
|
|
}
|
||
|
|
|
||
|
|
export function fetchUpdateI18nEntry(id: number, data: { value_zh: string; value_en: string }) {
|
||
|
|
return request<Api.Www.I18nEntry>({ url: `/www/i18n/${id}`, method: 'put', data });
|
||
|
|
}
|
||
|
|
|
||
|
|
export function fetchBatchUpdateI18nEntries(data: Array<{ id: number; value_zh: string; value_en: string }>) {
|
||
|
|
return request({ url: '/www/i18n/batch', method: 'put', data });
|
||
|
|
}
|