🎉 Initial Commit(Migrated from Interactive)

This commit is contained in:
2024-03-27 23:07:18 +08:00
commit 3a1cf006f4
126 changed files with 4471 additions and 0 deletions

14
src/scripts/request.ts Normal file
View File

@@ -0,0 +1,14 @@
const serviceMap: { [id: string]: string } = {
interactive: "https://co.solsynth.dev",
identity: "https://id.solsynth.dev"
}
export async function request(service: string, input: string, init?: RequestInit) {
const url = buildRequestUrl(service, input)
return await fetch(url, init)
}
export function buildRequestUrl(service: string, input: string) {
const prefix = serviceMap[service] ?? ""
return prefix + input
}