feat(admin): 增加登录限流、审计与令牌退出 (#42)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
fu500f
2026-10-31 00:50:23 +00:00
co-authored by Devin AI
parent 36f9c95fa7
commit 065198f227
11 changed files with 496 additions and 12 deletions
+2 -1
View File
@@ -59,7 +59,8 @@ export default function App() {
setView({ name: "list" });
}
function logout() {
async function logout() {
await api.logout().catch(() => undefined);
clearToken();
setAuthed(false);
setUsername("");
+1
View File
@@ -50,6 +50,7 @@ export const api = {
method: "POST",
body: JSON.stringify({ username, password }),
}),
logout: () => request<void>("/logout", { method: "POST" }),
me: () => request<{ username: string }>("/me"),
listProducts: (
q: string,