feat(admin): 增加登录限流、审计与令牌退出 (#42)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -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("");
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user