mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-29 19:30:34 +01:00
update docs
This commit is contained in:
@@ -21,7 +21,7 @@ export async function createContext(event: H3Event) {
|
|||||||
// Will be available as `ctx` in all your resolvers
|
// Will be available as `ctx` in all your resolvers
|
||||||
|
|
||||||
// This is just an example of something you might want to do in your ctx fn
|
// This is just an example of something you might want to do in your ctx fn
|
||||||
const authorization = getRequestHeader(event, authorization)
|
const authorization = getRequestHeader(event, 'authorization')
|
||||||
async function getUserFromHeader() {
|
async function getUserFromHeader() {
|
||||||
if (authorization) {
|
if (authorization) {
|
||||||
const user = await decodeAndVerifyJwtToken(authorization.split(' ')[1])
|
const user = await decodeAndVerifyJwtToken(authorization.split(' ')[1])
|
||||||
|
|||||||
Reference in New Issue
Block a user