We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be really great if the user object was available inside the POST function of +server.ts
async function POST(event: RequestEvent)
currently event.locals does not contain anything.
event.locals
Is there any for me to do this or for you to add this?
The text was updated successfully, but these errors were encountered:
Make a PR bro
Sorry, something went wrong.
When this PR gets merged, you can do it like this:
import { redirect } from '@sveltejs/kit' import { clerkClient } from 'svelte-clerk/server' export const load = ({ locals }) => { if (!locals.auth.userId) { return redirect(307, '/sign-in') } const user = await clerkClient.users.getUser(userId) return { user: JSON.parse(JSON.stringify(user)), } }
No branches or pull requests
It would be really great if the user object was available inside the POST function of +server.ts
currently
event.locals
does not contain anything.Is there any for me to do this or for you to add this?
The text was updated successfully, but these errors were encountered: