Skip to content

Commit

Permalink
fix: correctly resolve token vault key paths relative to project root
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordfirespeed committed Oct 27, 2024
1 parent 5843006 commit 27415f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/auth/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { getTokenVault } from "@durhack/token-vault"

import { tokenVaultConfig } from "@server/config"
import { type User, prisma } from "@server/database"
import { dirname } from "@server/dirname"

function resolveFilePathFromProjectRoot(path_to_resolve: string): string {
return path.resolve(path.join(import.meta.dirname, "..", path_to_resolve))
return path.resolve(path.join(dirname, "..", path_to_resolve))
}

export default await getTokenVault<User>({
Expand Down

0 comments on commit 27415f4

Please sign in to comment.