Maybe fix et member updating?
All checks were successful
Test, Build, Deploy / Test, Build, and Deploy (push) Successful in 56s
Test, Build, Deploy / Create Sentry Release (push) Successful in 5s

This commit is contained in:
2026-04-11 03:37:43 -04:00
parent cfc57c838e
commit b5e230e7f2

View File

@@ -42,8 +42,7 @@ export async function onRequestPatch(context: RequestContext) {
let queryData: { name?: string; roblox_id?: number } = {};
if (body.name?.length)
queryData = Object.defineProperty(queryData, "name", { value: body.name });
if (body.name?.length) queryData.name = body.name;
if (typeof body.roblox_username === "string" && body.roblox_username) {
const robloxResolveResp = await fetch(
@@ -67,9 +66,7 @@ export async function onRequestPatch(context: RequestContext) {
if (!data.length)
return jsonError("No Roblox user exists with that name", 400);
queryData = Object.defineProperty(queryData, "roblox_id", {
value: data[0].id,
});
queryData.roblox_id = data[0].id;
}
await context.data.prisma.etMember.update({