Test server

This commit is contained in:
2024-09-17 08:51:27 +08:00
parent 2fef481e2f
commit 2ccbca6566
21 changed files with 51 additions and 137 deletions

View File

@@ -1,13 +1,12 @@
"use server";
import { cookies } from "next/headers";
import yaml from "yaml";
import fs from "fs";
import { unsealData } from "iron-session";
import { redirect } from "next/navigation";
import { RouterAuth } from "@/app/lib/router_hipmi/router_auth";
import _ from "lodash";
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
import { PwdCookies } from "@/app/lib";
export async function user_funGetOneUserId() {
const kukis = cookies();
@@ -17,7 +16,7 @@ export async function user_funGetOneUserId() {
const token = JSON.parse(
await unsealData(c?.value as string, {
password: config.server.password,
password: PwdCookies,
})
);