integrate Editable Input, Netzwerkfehler bei PUT
This commit is contained in:
10
src/routes/api/user/+server.ts
Normal file
10
src/routes/api/user/+server.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
//Rollenabfrage ob Benutzer admin ist
|
||||
|
||||
import { json } from "@sveltejs/kit";
|
||||
|
||||
export async function GET({locals}) {
|
||||
const isAdmin = locals.user?.admin === true;
|
||||
const data = {admin: isAdmin}
|
||||
return json(data)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user