feat: release v0.1.3 chat, profiles, and media
Keep read receipts for the other person only, and let photos, voice, and files stay cached until they are actually replaced.
This commit is contained in:
@@ -228,12 +228,22 @@ func (s *Server) handleRequestPhysicalCertificate(w http.ResponseWriter, r *http
|
||||
|
||||
func (s *Server) handleAdminListPhysicalOrders(w http.ResponseWriter, r *http.Request) {
|
||||
status := r.URL.Query().Get("status")
|
||||
orders, err := s.store.ListPhysicalOrders(r.Context(), status)
|
||||
p := parsePageParams(r)
|
||||
orders, total, err := s.store.ListPhysicalOrders(r.Context(), status, p.PageSize, p.Offset)
|
||||
if err != nil {
|
||||
writeErr(w, http.StatusInternalServerError, "بارگذاری سفارشها ممکن نشد")
|
||||
return
|
||||
}
|
||||
writeJSON(w, http.StatusOK, map[string]any{"orders": orders, "physical": s.physicalSettings(r.Context())})
|
||||
if orders == nil {
|
||||
orders = []models.CertificatePhysicalOrder{}
|
||||
}
|
||||
writeJSON(w, http.StatusOK, map[string]any{
|
||||
"orders": orders,
|
||||
"total": total,
|
||||
"page": p.Page,
|
||||
"pageSize": p.PageSize,
|
||||
"physical": s.physicalSettings(r.Context()),
|
||||
})
|
||||
}
|
||||
|
||||
func (s *Server) handleAdminUpdatePhysicalOrder(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user