增加公告图片编辑, 增加取消归档
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user