Don't double-stringify save data
This commit is contained in:
parent
ecdd7c4988
commit
31e9935efe
@ -7,7 +7,7 @@ export async function onRequestGet(context: RequestContext) {
|
||||
if (isNaN(id)) return jsonError("ID must be a number", 400);
|
||||
|
||||
try {
|
||||
return jsonResponse(JSON.stringify(await getSaveData(context, id)));
|
||||
return jsonResponse(await getSaveData(context, id));
|
||||
} catch {
|
||||
return jsonError("Request to Roblox failed", 500);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ export async function getBanList(context: RequestContext) {
|
||||
return await data.json();
|
||||
}
|
||||
|
||||
export async function getSaveData(context: RequestContext, user: number) {
|
||||
export async function getSaveData(context: RequestContext, user: number): Promise<string> {
|
||||
const data = await fetch(`${SAVE_DATA_URL}${user}`, {
|
||||
headers: {
|
||||
"x-api-key": context.env.ROBLOX_OPENCLOUD_KEY,
|
||||
|
Loading…
x
Reference in New Issue
Block a user