ship 1.4.28:Arcrun@19c82df

This commit is contained in:
ship
2026-08-09 15:16:55 +08:00
parent 6878f7afbf
commit 652f261183
3 changed files with 29 additions and 10 deletions
+19
View File
@@ -12923,6 +12923,25 @@ portalRouter.post(
return c.json({ success: true, record_id: recordId, email, role: "admin" });
})
);
portalRouter.post(
"/portal/admin/recover-password",
(c) => run(c, async () => {
const consoleOk = await validateConsoleSession(c.env, c.req.header("authorization"));
if (!consoleOk) return c.json({ error: "\u9700\u8981 console owner session\uFF08\u5148\u767B\u5165 /console\uFF09" }, 401);
const body = await c.req.json().catch(() => null);
const email = String(body?.email ?? "").trim().toLowerCase();
if (!isValidEmail(email)) return c.json({ error: "email \u683C\u5F0F\u4E0D\u6B63\u78BA" }, 400);
const recordId = await findUserRecordId(c.env, email);
const rec = recordId ? await getRecordById(c.env, recordId) : null;
if (!recordId || !rec) return c.json({ error: `\u627E\u4E0D\u5230 email\uFF1D${email} \u7684 portal \u5E33\u865F` }, 404);
const password = generatePassword();
await patchRecordValues(c.env, recordId, {
password_hash: await hashPassword2(password),
updated_at: (/* @__PURE__ */ new Date()).toISOString()
});
return c.json({ success: true, email, password });
})
);
portalRouter.get(
"/portal/admin/users",
(c) => run(c, async () => {
+8 -8
View File
@@ -1,14 +1,14 @@
{
"schema": 1,
"built": "2026-08-09",
"source": "Arcrun@ebd4bf5",
"source": "Arcrun@19c82df",
"core": [
{
"name": "arcrun-cypher-executor",
"canonical": null,
"main_module": "worker.mjs",
"main_file": "arcrun-cypher-executor/worker.mjs",
"js_bytes": 551374,
"js_bytes": 552429,
"modules": [],
"compat_date": "2025-02-19",
"compat_flags": [
@@ -50,8 +50,8 @@
"services": 13
},
"warnings": [],
"sha256": "65cfb3a565d4a3e6d522ca07e5fa8d2b7ecd7755e501ddb6ee72318dae742d33",
"bytes": 551374
"sha256": "5162d75d4d0d73cd4fc8984ea6e5fb8e027704d96b5bde5c1dad094ff2b00819",
"bytes": 552429
},
{
"name": "arcrun-kbdb",
@@ -658,7 +658,7 @@
"tier": 2,
"main_file": "tier2/ui/index.js",
"main_module": "index.js",
"sha256": "6cfde048614f4e539f74a878e04e363c91cf1c37abbabafecfa69a0b3ea3b6ea",
"sha256": "b04d3f2efab9844a37853f767fedf7275ceefc7d3218a75c1494ea06e54bae40",
"compat_date": "2026-07-01",
"compat_flags": [],
"modules": [],
@@ -668,7 +668,7 @@
"ai": false,
"vars": {}
},
"bytes": 502642
"bytes": 508088
}
],
"daemon": {
@@ -684,8 +684,8 @@
"sha256": "791afe80279b13c25e76e56089ab077b92600bdf195ab7c907c91775d38ac858"
}
},
"release": "1.4.26",
"release": "1.4.28",
"built_for": "oauth-installer-lazy-load",
"notes": [],
"fingerprint": "f91c9f952316adbf40fcfd8d8dfd16a63ca21df90ac771edde6c15c6eae008e4"
"fingerprint": "f239fe5cb920cdbb0e40ad71a813a2a51fda206a9878276c9e5c351232fc3f63"
}
+2 -2
View File
File diff suppressed because one or more lines are too long