This commit is contained in:
jasinco 2025-06-10 18:39:52 +08:00
parent 7f70ff1c0c
commit 91b2fdf805

View file

@ -36,7 +36,7 @@ const Panel = () => {
if ((val.status == 401 || val.status == 400) && await val.text() == "missing or malformvald JWT") {
window.location.href = "/admin/login"
} else if (val.status == 200) {
setPosts((await val.json() as Array<Object>).map(post => POST.parse(post)).filter(e => posts.findIndex(x => x.id == e.id) != -1))
setPosts((await val.json() as Array<Object>).map(post => POST.parse(post)).filter(e => posts.findIndex(x => x.id == e.id) == -1))
}
}).finally(() => { setLoading(false) })
}