更新 update 门户站点界面和后台功能
build-winui / winui (push) Waiting to run

This commit is contained in:
QWQLwToo
2026-06-27 18:09:11 +08:00
parent 2513eb2903
commit 962a2f2143
56 changed files with 4564 additions and 714 deletions
@@ -50,6 +50,9 @@ func (r *router) handleAdminLegacy(w http.ResponseWriter, req *http.Request) {
if name == "media-types" {
_ = r.sources.ImportLegacyMediaTypes(req.Context())
}
if name == "update-info" {
r.syncNoticeFromLegacyUpdateInfo(req, doc.Raw)
}
writeJSON(w, http.StatusOK, map[string]any{"ok": true, "document": doc})
return
}
@@ -83,8 +86,18 @@ func (r *router) handleAdminLegacy(w http.ResponseWriter, req *http.Request) {
if name == "media-types" {
_ = r.sources.ImportLegacyMediaTypes(req.Context())
}
if name == "update-info" {
r.syncNoticeFromLegacyUpdateInfo(req, doc.Raw)
}
writeJSON(w, http.StatusOK, map[string]any{"ok": true, "document": doc})
return
}
http.NotFound(w, req)
}
func (r *router) syncNoticeFromLegacyUpdateInfo(req *http.Request, raw string) {
if r.notices == nil {
return
}
_ = r.notices.SyncFromLegacyUpdateInfo(req.Context(), raw, "admin")
}