fix dashboard throwing exception
This commit is contained in:
parent
43b38bc7e4
commit
1c86bba219
1 changed files with 2 additions and 2 deletions
|
@ -75,8 +75,8 @@ export default abstract class MediaRepo {
|
|||
|
||||
public static async SelectTotalMediaSizeByUserId(userId: number) {
|
||||
const dbCount = await Database.Instance.query('SELECT SUM(FileSize) FROM Media WHERE IsDeleted = 0 AND UserId = ?', [ userId ]);
|
||||
|
||||
return dbCount[0]["SUM(FileSize)"];
|
||||
|
||||
return dbCount[0]["SUM(FileSize)"] ?? 0;
|
||||
}
|
||||
|
||||
public static async SelectTotalMediaByUserId(userId: number) {
|
||||
|
|
Loading…
Add table
Reference in a new issue