增加公告图片编辑, 增加取消归档

This commit is contained in:
yml
2026-06-15 20:37:13 +08:00
parent 85f2d9b3b3
commit 9271f47553
16 changed files with 765 additions and 26 deletions
@@ -173,6 +173,22 @@ func (h *Handler) Archive(c *gin.Context) {
response.OK(c, gin.H{"message": "归档成功"})
}
// Unarchive 取消归档公告
func (h *Handler) Unarchive(c *gin.Context) {
id, err := parseID(c)
if err != nil {
response.BadRequest(c, "公告ID不正确")
return
}
if err := h.service.Unarchive(c.Request.Context(), id); err != nil {
response.InternalServerError(c, "取消归档公告失败")
return
}
response.OK(c, gin.H{"message": "取消归档成功"})
}
// Delete 删除公告
func (h *Handler) Delete(c *gin.Context) {
id, err := parseID(c)