Skip to content

Releases: wobsoriano/nuxt-remote-fn

v0.1.25

21 Dec 07:47
Compare
Choose a tag to compare

   🚀 Features

    View changes on GitHub

v0.1.24

20 Dec 19:58
Compare
Choose a tag to compare

   🚀 Features

    View changes on GitHub

v0.1.23

20 Dec 08:57
Compare
Choose a tag to compare

   🚀 Features

Usage

// todo.server.ts

export function createContext() {
  const event = useEvent()

  async function getUserFromHeader() {
    const authorization = getRequestHeader(event, 'authorization')
    if (authorization) {
      const user = await decodeAndVerifyJwtToken(authorization.split(' ')[1])
      return user
    }
    return null
  }

  event.context.user = await getUserFromHeader()
}

export async function addTodo(todo: Todo) {
  const event = useEvent()

  if (!event.context.user) {
    throw createError({ statusCode: 401 })
  }

  // addTodo logic
}
    View changes on GitHub

v0.1.22

18 Dec 20:13
Compare
Choose a tag to compare

No significant changes

    View changes on GitHub

v0.1.20

13 Dec 06:12
Compare
Choose a tag to compare

No significant changes

    View changes on GitHub

v0.1.19

06 Dec 16:43
Compare
Choose a tag to compare

   🚀 Features

    View changes on GitHub

v0.1.18

05 Dec 17:26
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v0.1.17

05 Dec 16:59
Compare
Choose a tag to compare

   🚀 Features

    View changes on GitHub

v0.1.16

03 Dec 20:11
Compare
Choose a tag to compare

No significant changes

    View changes on GitHub

v0.1.14

03 Dec 04:10
Compare
Choose a tag to compare

No significant changes

    View changes on GitHub