Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't double-stringify save data
  • Loading branch information
regalijan committed Sep 5, 2024
1 parent ecdd7c4 commit 31e9935
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/api/game-bans/[user]/save-data.ts
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion functions/roblox-open-cloud.ts
Expand Up @@ -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,
Expand Down

0 comments on commit 31e9935

Please sign in to comment.