Skip to content

Commit

Permalink
fix: auto import not working
Browse files Browse the repository at this point in the history
  • Loading branch information
rashidpathiyil committed Apr 1, 2024
1 parent c52fca5 commit 764db7e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/runtime/middleware/lock.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import {
abortNavigation,
defineNuxtRouteMiddleware,
useCookie,
ref,
reloadNuxtApp
} from '#imports'


export default defineNuxtRouteMiddleware(async (to, from) => {
const isUnlocked = useCookie('isUnlocked', {
default: () => ref(false),
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/server/api/is-locked.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { defineEventHandler } from 'h3'

export default defineEventHandler(async (event) => {
const password = process.env.APP_LOCK_PASSWORD
if (password)
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/server/api/validate.post.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { defineEventHandler, readBody } from 'h3'

export default defineEventHandler(async (event) => {
const password = process.env.APP_LOCK_PASSWORD
if (!password)
Expand Down

0 comments on commit 764db7e

Please sign in to comment.