mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-09 03:47:26 +08:00
[+] Export maimai userdata
This commit is contained in:
@@ -141,6 +141,7 @@ export const EN_REF_SETTINGS = {
|
||||
'settings.profile.bio': 'Bio',
|
||||
'settings.profile.unset': 'Unset',
|
||||
'settings.profile.unchanged': 'Unchanged',
|
||||
'settings.export': 'Export Player Data',
|
||||
}
|
||||
|
||||
export const EN_REF_USERBOX = {
|
||||
|
||||
@@ -150,6 +150,7 @@ const zhSettings: typeof EN_REF_SETTINGS = {
|
||||
'settings.profile.bio': '简介',
|
||||
'settings.profile.unset': '未设置',
|
||||
'settings.profile.unchanged': '未更改',
|
||||
'settings.export': '导出玩家数据',
|
||||
}
|
||||
|
||||
export const ZH = { ...zhUser, ...zhWelcome, ...zhGeneral,
|
||||
|
||||
@@ -46,7 +46,7 @@ export function fetchWithParams(input: URL | RequestInfo, init?: RequestInitWith
|
||||
|
||||
const cache: { [index: string]: any } = {}
|
||||
|
||||
export async function post(endpoint: string, params: any, init?: RequestInitWithParams): Promise<any> {
|
||||
export async function post(endpoint: string, params: Record<string, any> = {}, init?: RequestInitWithParams): Promise<any> {
|
||||
// Add token if exists
|
||||
const token = localStorage.getItem('token')
|
||||
if (token && !('token' in params)) params = { ...(params ?? {}), token }
|
||||
@@ -301,6 +301,8 @@ export const GAME = {
|
||||
post(`/api/v2/game/${game}/ranking`, { }),
|
||||
changeName: (game: GameName, newName: string): Promise<{ newName: string }> =>
|
||||
post(`/api/v2/game/${game}/change-name`, { newName }),
|
||||
export: (game: GameName): Promise<Record<string, any>> =>
|
||||
post(`/api/v2/game/${game}/export`),
|
||||
}
|
||||
|
||||
export const DATA = {
|
||||
|
||||
Reference in New Issue
Block a user