Skip to content

Commit 38b927d

Browse files
committed
feat: sync card archive status
1 parent e80b254 commit 38b927d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

internal/controller/question_controller.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (*QuestionController) Get(c *gin.Context) {
154154
})
155155
}
156156

157-
func (*QuestionController) Put(c *gin.Context) {
157+
func (this *QuestionController) Put(c *gin.Context) {
158158
var request QuestionModifyRequest
159159
if err := c.ShouldBindJSON(&request); err != nil {
160160
Fail(c, 400, "请求错误")
@@ -181,6 +181,10 @@ func (*QuestionController) Put(c *gin.Context) {
181181
Fail(c, 500, "修改提问失败")
182182
return
183183
}
184+
this.eventChan <- SSEvent{
185+
Type: SSEventArchive,
186+
Data: q.ID,
187+
}
184188
Success(c, nil)
185189
}
186190

0 commit comments

Comments
 (0)