Skip to content

Commit

Permalink
fix(api): use bigint as size (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsonck92 authored Aug 17, 2024
1 parent bba7f8e commit 0b27033
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/repo/file_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ func (repo *fileRepo) GetSize(id string) (int64, error) {
Raw(`WITH RECURSIVE rec (id, parent_id) AS
(SELECT f.id, f.parent_id FROM file f WHERE f.id = ?
UNION SELECT f.id, f.parent_id FROM rec, file f WHERE f.parent_id = rec.id)
SELECT coalesce(sum((s.original->>'size')::int), 0) as result FROM snapshot s, rec
SELECT coalesce(sum((s.original->>'size')::bigint), 0) as result FROM snapshot s, rec
LEFT JOIN snapshot_file map ON rec.id = map.file_id WHERE map.snapshot_id = s.id`,
id).
Scan(&res)
Expand Down

0 comments on commit 0b27033

Please sign in to comment.