Initial, working login and logout with spotify
This commit is contained in:
13
src/routes/+page.server.ts
Normal file
13
src/routes/+page.server.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { db } from "$lib/server/db";
|
||||
import { usersTable } from "$lib/server/db/schema";
|
||||
import type { PageServerLoad } from "./$types";
|
||||
|
||||
|
||||
export const load: PageServerLoad = async ({ locals }) => {
|
||||
const allUsers = await db.select().from(usersTable);
|
||||
|
||||
return {
|
||||
user: locals.user,
|
||||
users: allUsers
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user