修复图片上传分类无法新增、潜在movementWindow容差问题、404页面未生效问题

This commit is contained in:
tamakyi
2026-09-18 17:06:22 +08:00
parent f8e1076296
commit ad2531c113
9 changed files with 749 additions and 23 deletions
+3 -3
View File
@@ -497,17 +497,17 @@ func (s *Server) placePage(w http.ResponseWriter, r *http.Request) {
}
p.HasMap = true
if p.Dataset == nil {
http.NotFound(w, r)
s.notFoundPage(w, "这个地点不存在", "站点还没有导入任何数据,这一页自然也没有内容。")
return
}
id, err := strconv.ParseInt(r.PathValue("id"), 10, 64)
if err != nil {
http.NotFound(w, r)
s.notFoundPage(w, "这个地址不对", "地点的编号应该是数字,链接可能被截断了。")
return
}
place, err := s.q.Place(r.Context(), p.Dataset.ID, id)
if err != nil {
http.NotFound(w, r)
s.notFoundPage(w, "这个地点不存在", "")
return
}
if regionHidden(p.Settings, p.IsAdmin(), place) {