add priority ids at outgoing letter
This commit is contained in:
@@ -102,7 +102,17 @@ func (h *LetterOutgoingHandler) ListOutgoingLetters(c *gin.Context) {
|
||||
req.Limit = 10
|
||||
}
|
||||
|
||||
if ids := c.QueryArray("priority_ids[]"); len(ids) > 0 {
|
||||
for _, s := range ids {
|
||||
if id, err := uuid.Parse(s); err == nil {
|
||||
req.PriorityIDs = append(req.PriorityIDs, id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Printf("[DEBUG] request: %v\n", req)
|
||||
fmt.Printf("[DEBUG] Raw query: %v\n", c.Request.URL.RawQuery)
|
||||
fmt.Printf("[DEBUG] Parsed form: %v\n", c.Request.URL.Query())
|
||||
|
||||
resp, err := h.svc.ListOutgoingLetters(c.Request.Context(), &req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user