func CompleteIncoming(w http.ResponseWriter, req *http.Request) {
	// Check ticket
	t, err := fetchTicketHeader(req)
	if err != nil {
		httputils.ErrorOut(w, http.StatusUnauthorized, invalidTicketID)
		return
	}

	// queue the message for processing
	processor.QueueIncomingMessage(t.ID)

	// Remove ticket
	ticketRepo := container.Instance.GetTicketRepo()
	ticketRepo.Remove(t.ID)

	_ = httputils.JSONOut(w, http.StatusAccepted, httputils.StatusOk("message accepted"))
}
// CompleteIncoming is called whenever everything from a message has been uploaded and can be actually send
CompleteIncoming is called whenever everything from a message has been uploaded and can be actually send
// CompleteIncoming is called whenever everything from a message has been uploaded and can be actually send
func CompleteIncoming(w http.ResponseWriter, req *http.Request) {
	t, err := fetchTicketHeader(req)
	if err != nil {
		httputils.ErrorOut(w, http.StatusUnauthorized, invalidTicketID)
		return
	}
	processor.QueueIncomingMessage(t.ID)
	ticketRepo := container.Instance.GetTicketRepo()
	ticketRepo.Remove(t.ID)
	_ = httputils.JSONOut(w, http.StatusAccepted, httputils.StatusOk("message accepted"))
}
func CompleteIncoming ( w http . ResponseWriter , req * http . Request ) { t , err := fetchTicketHeader ( req ) if err != nil { httputils . ErrorOut ( w , http . StatusUnauthorized , invalidTicketID ) return } processor . QueueIncomingMessage ( t . ID ) ticketRepo := container . Instance . GetTicketRepo ( ) ticketRepo . Remove ( t . ID ) _ = httputils . JSONOut ( w , http . StatusAccepted , httputils . StatusOk ( " " ) ) }
CompleteIncoming is called whenever everything from a message has been uploaded and can be actually send
CompleteIncoming is called whenever everything from a message has been uploaded and can be actually send
// Check ticket // queue the message for processing // Remove ticket