🐛 Fix edit sticker use wrong API

This commit is contained in:
LittleSheep 2024-09-29 22:58:52 +08:00
parent 8b4b6eb703
commit f80df60858

View File

@ -162,10 +162,13 @@ async function submit(evt: SubmitEvent) {
submitting.value = true
const res = await solarFetch(`/cgi/uc/stickers/packs/${route.params.id}`, {
const res = await solarFetch(`/cgi/uc/stickers/${route.params.sticker}`, {
method: "PUT",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(data),
body: JSON.stringify({
pack_id: parseInt(route.params.id.toString()),
...data,
}),
})
if (res.status != 200) {
error.value = await res.text()