fix(uploads): refresh destination previews and improve queue layout
ci / api / api (push) Successful in 50s
ci / db / db (push) Successful in 56s
ci / module boundaries / boundaries (push) Successful in 8s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 1m2s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m15s
ci / ts / ts (packages + web) (push) Failing after 4m28s
ci / api / api (push) Successful in 50s
ci / db / db (push) Successful in 56s
ci / module boundaries / boundaries (push) Successful in 8s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 1m2s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m15s
ci / ts / ts (packages + web) (push) Failing after 4m28s
This commit is contained in:
1 parent
eb75437708
commit
30c3c85f89
18 files changed
+603
-402
No files matched your search
@@ -268,7 +268,14 @@ func (s *Service) ListAll(ctx context.Context, fl ListFilter) ([]File, string, e
|
||||
if _, err := principal(ctx, auth.PermReviewUploads); err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
return s.list(ctx, fl)
|
||||
files, next, err := s.list(ctx, fl)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
for i := range files {
|
||||
s.previewPlacement(ctx, &files[i])
|
||||
}
|
||||
return files, next, nil
|
||||
}
|
||||
|
||||
func (s *Service) list(ctx context.Context, fl ListFilter) ([]File, string, error) {
|
||||
@@ -339,7 +346,11 @@ func (s *Service) Update(ctx context.Context, id uuid.UUID, in UpdateInput) (Fil
|
||||
if err := s.store.UpdateMetadata(ctx, id, m, edited, pl); err != nil {
|
||||
return File{}, notFound(err)
|
||||
}
|
||||
return s.store.File(ctx, id)
|
||||
updated, err := s.store.File(ctx, id)
|
||||
if err == nil {
|
||||
s.previewPlacement(ctx, &updated)
|
||||
}
|
||||
return updated, err
|
||||
}
|
||||
|
||||
func normalizeMeta(m Meta) Meta {
|
||||
|
||||
Reference in new issue
Block a user