title: auto

des: auto
note:auto
This commit is contained in:
2023-10-03 09:32:00 +08:00
parent 6ac6720c66
commit bde21823de
10 changed files with 37 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ import prisma from "@/app/lib/prisma";
import { NextResponse } from "next/server";
import { cookies } from "next/headers";
import { sealData, unsealData } from "iron-session";
import {getConfig} from "@/bin/config";
export async function POST(req: Request) {
if (req.method === "POST") {
@@ -30,7 +31,7 @@ export async function POST(req: Request) {
username: data.username,
}),
{
password: process.env.PWD as string,
password: (await getConfig()).server.password,
}
);