feat: adding photo & video storage space to server stats (#14125)

* expose detailed user storage stats + display them in the storage per user table

* chore: openapi & sql

* fix: fix test stubs

* fix: formatting errors, e2e test and server test

* fix: upper lower case typo in spec file

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
weathondev 2024-11-15 23:38:57 +01:00 committed by GitHub
parent 24ae4ecff1
commit f5c4af73aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 138 additions and 7 deletions

View file

@ -126,11 +126,16 @@ export class ServerService extends BaseService {
usage.photos = user.photos;
usage.videos = user.videos;
usage.usage = user.usage;
usage.usagePhotos = user.usagePhotos;
usage.usageVideos = user.usageVideos;
usage.quotaSizeInBytes = user.quotaSizeInBytes;
serverStats.photos += usage.photos;
serverStats.videos += usage.videos;
serverStats.usage += usage.usage;
serverStats.usagePhotos += usage.usagePhotos;
serverStats.usageVideos += usage.usageVideos;
serverStats.usageByUser.push(usage);
}