diff options
Diffstat (limited to 'server/models/avatar/avatar.ts')
-rw-r--r-- | server/models/avatar/avatar.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/models/avatar/avatar.ts b/server/models/avatar/avatar.ts index e1d4c20bc..51e26c87b 100644 --- a/server/models/avatar/avatar.ts +++ b/server/models/avatar/avatar.ts | |||
@@ -3,6 +3,7 @@ import { AfterDestroy, AllowNull, Column, CreatedAt, Model, Table, UpdatedAt } f | |||
3 | import { Avatar } from '../../../shared/models/avatars/avatar.model' | 3 | import { Avatar } from '../../../shared/models/avatars/avatar.model' |
4 | import { unlinkPromise } from '../../helpers/core-utils' | 4 | import { unlinkPromise } from '../../helpers/core-utils' |
5 | import { CONFIG, STATIC_PATHS } from '../../initializers' | 5 | import { CONFIG, STATIC_PATHS } from '../../initializers' |
6 | import { logger } from '../../helpers/logger' | ||
6 | 7 | ||
7 | @Table({ | 8 | @Table({ |
8 | tableName: 'avatar' | 9 | tableName: 'avatar' |
@@ -21,6 +22,7 @@ export class AvatarModel extends Model<AvatarModel> { | |||
21 | 22 | ||
22 | @AfterDestroy | 23 | @AfterDestroy |
23 | static removeFilesAndSendDelete (instance: AvatarModel) { | 24 | static removeFilesAndSendDelete (instance: AvatarModel) { |
25 | logger.info('Removing avatar file %s.', instance.filename) | ||
24 | return instance.removeAvatar() | 26 | return instance.removeAvatar() |
25 | } | 27 | } |
26 | 28 | ||