fix: "run" : false,

This commit is contained in:
xkm
2025-04-17 20:10:12 +08:00
parent 48f3f3b155
commit 9245b2ec54

View File

@@ -40,6 +40,10 @@ func (h *PasteHandler) SubmitPaste(c *gin.Context) {
UpdatedAt: time.Now(), UpdatedAt: time.Now(),
} }
if !req.Run {
paste.Status = model.StatusCompleted
}
if err := h.repo.Save(paste); err != nil { if err := h.repo.Save(paste); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{ c.JSON(http.StatusInternalServerError, gin.H{
"message": "Internal Server Error", "message": "Internal Server Error",