редактирование и удаление сопоставлений

список накладных с позициями
This commit is contained in:
2025-12-29 10:46:05 +03:00
parent c2d382cb6a
commit 310a64e3ba
30 changed files with 1250 additions and 8173 deletions

View File

@@ -132,3 +132,20 @@ func (h *OCRHandler) GetUnmatched(c *gin.Context) {
}
c.JSON(http.StatusOK, items)
}
func (h *OCRHandler) DiscardUnmatched(c *gin.Context) {
userID := c.MustGet("userID").(uuid.UUID)
rawName := c.Query("raw_name")
if rawName == "" {
c.JSON(http.StatusBadRequest, gin.H{"error": "raw_name is required"})
return
}
if err := h.service.DiscardUnmatched(userID, rawName); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.JSON(http.StatusOK, gin.H{"status": "discarded"})
}