#Job done

## feat
- Fix bug login
### No issuue
This commit is contained in:
2024-03-01 14:36:02 +08:00
parent b1395a8ded
commit 0f2280f116
31 changed files with 698 additions and 192 deletions

View File

@@ -5,11 +5,12 @@ 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";
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
export async function User_getUserId() {
const c = cookies().get("ssn");
if (!c?.value) return redirect("/dev/auth/login");
if (!c?.value) return redirect(RouterAuth.login);
const token = JSON.parse(
await unsealData(c?.value as string, {