From e094af54f62bcc78dd783df5052b85c9d2ec3801 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 20 Oct 2022 21:12:27 +0100 Subject: [PATCH] chore: update h3 types --- .github/workflows/test.yml | 3 +++ package.json | 1 + src/server/utils/auth.ts | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f65c068f..d6f2b230 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,5 +26,8 @@ jobs: - name: Lint project run: pnpm lint + # - name: Type check + # run: pnpm test:types + - name: Unit tests run: pnpm test diff --git a/package.json b/package.json index 8ee29d2e..5862f9ac 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "lint:style": "stylelint **/*.{vue,css} --fix --ignore-path .gitignore", "lint": "pnpm lint:js && pnpm lint:style", "test": "echo 'need some unit tests' || vitest run test/unit", + "test:types": "nuxi typecheck", "test:e2e": "playwright test test/e2e", "postinstall": "nuxt prepare && husky install && node ./node_modules/playwright/install.js" }, diff --git a/src/server/utils/auth.ts b/src/server/utils/auth.ts index a40ecc0d..67159d92 100644 --- a/src/server/utils/auth.ts +++ b/src/server/utils/auth.ts @@ -1,7 +1,7 @@ -import type { CompatibilityEvent } from 'h3' +import type { H3Event } from 'h3' import * as jose from 'jose' -export async function verifyUser (event: CompatibilityEvent) { +export async function verifyUser (event: H3Event) { const { token } = useCookies(event) if (!token) return null @@ -14,7 +14,7 @@ export async function verifyUser (event: CompatibilityEvent) { } export async function loginUser ( - event: CompatibilityEvent, + event: H3Event, claims: Record ) { const privateKey = await jose.importPKCS8( -- knotmirror 0.0.1