Skip to content

Commit

Permalink
get the correct token
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Oct 18, 2023
1 parent bcc0283 commit 48bdfcb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { users } from '@kittycad/lib'
import { users, Client } from '@kittycad/lib'

export const load = async ({ cookies }) => {
console.log('cookies', cookies.getAll())
let token = cookies.get('__Secure-next-auth.session-token')

Check failure on line 4 in src/routes/+layout.server.ts

View workflow job for this annotation

GitHub Actions / types-lint-build

'token' is never reassigned. Use 'const' instead
console.log('token', token)

const client = new Client(token)

Check failure on line 7 in src/routes/+layout.server.ts

View workflow job for this annotation

GitHub Actions / types-lint-build

'client' is assigned a value but never used
const response = await users.get_user_self()

return {
Expand Down

0 comments on commit 48bdfcb

Please sign in to comment.