From 9245b2ec54d0003b22234c0fd027387a28f5fc78 Mon Sep 17 00:00:00 2001 From: xkm <521-arch@starryskymeow.top> Date: Thu, 17 Apr 2025 20:10:12 +0800 Subject: [PATCH] fix: "run" : false, --- internal/controller/paste_controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/controller/paste_controller.go b/internal/controller/paste_controller.go index 099c344..4dd4bfb 100644 --- a/internal/controller/paste_controller.go +++ b/internal/controller/paste_controller.go @@ -40,6 +40,10 @@ func (h *PasteHandler) SubmitPaste(c *gin.Context) { UpdatedAt: time.Now(), } + if !req.Run { + paste.Status = model.StatusCompleted + } + if err := h.repo.Save(paste); err != nil { c.JSON(http.StatusInternalServerError, gin.H{ "message": "Internal Server Error",