mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-07 14:37:33 +08:00
[+] Turnstile site key
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
|
||||
const aqua_host = 'https://aquanet.example.com/aqua'
|
||||
const data_host = 'https://aquanet.example.com'
|
||||
|
||||
export { aqua_host, data_host }
|
||||
|
||||
const AQUA_HOST = 'https://aquanet.example.com/aqua'
|
||||
const DATA_HOST = 'https://aquanet.example.com'
|
||||
|
||||
const TURNSTILE_SITE_KEY = '0x4AAAAAAASGA2KQEIelo9P9'
|
||||
|
||||
export { AQUA_HOST, DATA_HOST }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { aqua_host, data_host } from './config'
|
||||
import { AQUA_HOST, DATA_HOST } from './config'
|
||||
import type { TrendEntry } from './generalTypes'
|
||||
import type { MaimaiUserSummaryEntry } from './maimaiTypes'
|
||||
|
||||
@@ -26,18 +26,18 @@ export function getMult(achievement: number) {
|
||||
|
||||
|
||||
export async function getMaimai(endpoint: string, params: any) {
|
||||
return await fetch(`${aqua_host}/Maimai2Servlet/${endpoint}`, {
|
||||
return await fetch(`${AQUA_HOST}/Maimai2Servlet/${endpoint}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
||||
export async function getMaimaiAllMusic(): Promise<{ [key: string]: any }> {
|
||||
return fetch(`${data_host}/maimai/meta/00/all-music.json`).then(it => it.json())
|
||||
return fetch(`${DATA_HOST}/maimai/meta/00/all-music.json`).then(it => it.json())
|
||||
}
|
||||
|
||||
export async function getMaimaiApi(endpoint: string, params: any) {
|
||||
const url = new URL(`${aqua_host}/api/game/maimai2new/${endpoint}`)
|
||||
const url = new URL(`${AQUA_HOST}/api/game/maimai2new/${endpoint}`)
|
||||
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]))
|
||||
return await fetch(url).then(res => res.json())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user