feat(web): improved server stats

This commit is contained in:
Michel Heusschen
2023-02-25 15:05:58 +01:00
parent 71d8567f18
commit 09a1d56bf3
25 changed files with 199 additions and 260 deletions
@@ -33,6 +33,7 @@ const adminUser: UserEntity = Object.freeze({
createdAt: '2021-01-01',
updatedAt: '2021-01-01',
tags: [],
assets: [],
});
const immichUser: UserEntity = Object.freeze({
@@ -48,6 +49,7 @@ const immichUser: UserEntity = Object.freeze({
createdAt: '2021-01-01',
updatedAt: '2021-01-01',
tags: [],
assets: [],
});
const updatedImmichUser: UserEntity = Object.freeze({
@@ -63,6 +65,7 @@ const updatedImmichUser: UserEntity = Object.freeze({
createdAt: '2021-01-01',
updatedAt: '2021-01-01',
tags: [],
assets: [],
});
const adminUserResponse = Object.freeze({
+2
View File
@@ -76,6 +76,7 @@ export const userEntityStub = {
createdAt: '2021-01-01',
updatedAt: '2021-01-01',
tags: [],
assets: [],
}),
user1: Object.freeze<UserEntity>({
...authStub.user1,
@@ -88,6 +89,7 @@ export const userEntityStub = {
createdAt: '2021-01-01',
updatedAt: '2021-01-01',
tags: [],
assets: [],
}),
};
@@ -7,6 +7,7 @@ import {
PrimaryGeneratedColumn,
UpdateDateColumn,
} from 'typeorm';
import { AssetEntity } from './asset.entity';
import { TagEntity } from './tag.entity';
@Entity('users')
@@ -49,4 +50,7 @@ export class UserEntity {
@OneToMany(() => TagEntity, (tag) => tag.user)
tags!: TagEntity[];
@OneToMany(() => AssetEntity, (asset) => asset.owner)
assets!: AssetEntity[];
}