add more api response results
All checks were successful
deploy / build-and-deploy (push) Successful in 18s
All checks were successful
deploy / build-and-deploy (push) Successful in 18s
This commit is contained in:
@@ -141,6 +141,14 @@
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
|
// Vorname des Spielers
|
||||||
|
firstname: string,
|
||||||
|
// Nachname des Spielers
|
||||||
|
lastname: string,
|
||||||
|
// Nutzername des Spielers
|
||||||
|
username: string,
|
||||||
|
// UUID des Spielers
|
||||||
|
uuid: string,
|
||||||
// Liste aller Strikes, die der Spieler hat
|
// Liste aller Strikes, die der Spieler hat
|
||||||
strikes: {
|
strikes: {
|
||||||
// UTC Timestamp wann der Strike erstellt wurde
|
// UTC Timestamp wann der Strike erstellt wurde
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ export const POST: APIRoute = async ({ request }) => {
|
|||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
firstname: user.firstname,
|
||||||
|
lastname: user.lastname,
|
||||||
|
username: user.username,
|
||||||
|
uuid: user.uuid,
|
||||||
strikes: strikes.map((s) => ({ at: s.at.getTime(), weight: s.reason.weight }))
|
strikes: strikes.map((s) => ({ at: s.at.getTime(), weight: s.reason.weight }))
|
||||||
}),
|
}),
|
||||||
{ status: 200 }
|
{ status: 200 }
|
||||||
|
|||||||
Reference in New Issue
Block a user