Skip to content

Commit

Permalink
updates
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 57457e3 commit c8ea177
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { users, Client } from '@kittycad/lib'

export const load = async ({ cookies, event }) => {
console.log('event', event)
export const load = async ({ cookies }) => {
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)
const response = await users.get_user_self()
const response = await users.get_user_self({ client })

return {
user: 'error_code' in response ? undefined : response
Expand Down

0 comments on commit c8ea177

Please sign in to comment.