Skip to content

Commit faf6107

Browse files
committed
chore: apply latest changes on nuxt-auth and nuxt-naiveui
1 parent 22f5fd1 commit faf6107

File tree

5 files changed

+50
-39
lines changed

5 files changed

+50
-39
lines changed

config/auth.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import type { ModuleOptions } from '@bg-dev/nuxt-auth'
33
export const auth: Partial<ModuleOptions> = {
44
baseUrl: 'http://localhost:3000',
55

6+
prisma: false,
7+
68
accessToken: {
79
jwtSecret: '*'
810
},

layouts/default.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</template>
3535

3636
<script setup lang="ts">
37-
import type { MenuLinkRoute } from '@bg-dev/nuxt-naiveui'
37+
import type { MenuLinkRoute } from '#build/types/naiveui'
3838
3939
const { logout } = useAuth()
4040

package-lock.json

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"lint": "eslint ."
2626
},
2727
"devDependencies": {
28-
"@bg-dev/nuxt-auth": "^2.4.8",
29-
"@bg-dev/nuxt-naiveui": "^1.11.0",
28+
"@bg-dev/nuxt-auth": "^2.6.0",
29+
"@bg-dev/nuxt-naiveui": "^1.13.1",
3030
"@nuxt/devtools": "^1.1.3",
3131
"@nuxt/fonts": "^0.4.0",
3232
"@nuxtjs/eslint-config-typescript": "^12.1.0",

server/plugins/prisma.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { PrismaClient } from '@prisma/client'
2+
3+
export default defineNitroPlugin((nitroApp) => {
4+
const prisma = new PrismaClient()
5+
6+
nitroApp.hooks.hook('request', (event) => {
7+
event.context.prisma = prisma
8+
})
9+
})

0 commit comments

Comments
 (0)