return if user is banned in api response
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m7s

This commit is contained in:
bytedream 2023-12-10 19:27:11 +01:00
parent 58bc475aec
commit 9352083884

View File

@ -20,7 +20,9 @@ export const GET = (async ({ url }) => {
username: user.username,
firstname: user.firstname,
lastname: user.lastname,
ban_until: strike ? strike.ban_until.getTime() / 1000 : null
banned:
new Date(new Date(Date.now()).toUTCString()) <
new Date((strike?.ban_until ?? new Date(0)).toUTCString())
}),
{ status: 200 }
);