fix secrets mess

This commit is contained in:
not-nullptr 2024-03-11 00:17:41 +00:00
parent 57e423633c
commit 2442d891b8
6 changed files with 9 additions and 5 deletions

View file

@ -0,0 +1,4 @@
{
"PUBLIC_KEY": "-----BEGIN PUBLIC...",
"PRIVATE_KEY": "-----BEGIN PRIVATE..."
}

View file

@ -1,6 +1,6 @@
import type { IJwtData } from "$types/auth";
import type { Role } from "$types/db";
import { PUBLIC_KEY } from "../secrets";
import { PUBLIC_KEY } from "../secrets/secrets.json";
import jwt from "jsonwebtoken";
export function json<T>(body: T): Response {

View file

@ -1,6 +1,6 @@
import { userRepo } from "$lib/server/repo";
import type { SuyuUser } from "$lib/server/schema";
import { PUBLIC_KEY } from "$lib/server/secrets";
import { PUBLIC_KEY } from "$lib/server/secrets/secrets.json";
import type { IJwtData } from "$types/auth";
import cookie from "cookie";
import jwt from "jsonwebtoken";