diff options
author | buoyantair <buoyantair@protonmail.com> | 2018-11-20 12:28:13 +0530 |
---|---|---|
committer | buoyantair <buoyantair@protonmail.com> | 2018-11-20 12:28:13 +0530 |
commit | bc22d60899e14631cba0fb6450f4e85fc9528293 (patch) | |
tree | 285fa55033bc065df803adc2e4e3142fdfdd7309 /server/models | |
parent | b9f234371bfaf0d9cfa81e02fcea92cac1f9ae13 (diff) | |
parent | d216b5387fb774d1355df3ace002f7be469bd450 (diff) | |
download | PeerTube-bc22d60899e14631cba0fb6450f4e85fc9528293.tar.gz PeerTube-bc22d60899e14631cba0fb6450f4e85fc9528293.tar.zst PeerTube-bc22d60899e14631cba0fb6450f4e85fc9528293.zip |
Merge branch 'develop' of https://github.com/Chocobozzz/PeerTube into move-utils-to-shared
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/account/user.ts | 4 | ||||
-rw-r--r-- | server/models/oauth/oauth-token.ts | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/models/account/user.ts b/server/models/account/user.ts index 34aafa1a7..1843603f1 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { | 2 | import { |
3 | AfterDelete, | 3 | AfterDestroy, |
4 | AfterUpdate, | 4 | AfterUpdate, |
5 | AllowNull, | 5 | AllowNull, |
6 | BeforeCreate, | 6 | BeforeCreate, |
@@ -179,7 +179,7 @@ export class UserModel extends Model<UserModel> { | |||
179 | } | 179 | } |
180 | 180 | ||
181 | @AfterUpdate | 181 | @AfterUpdate |
182 | @AfterDelete | 182 | @AfterDestroy |
183 | static removeTokenCache (instance: UserModel) { | 183 | static removeTokenCache (instance: UserModel) { |
184 | return clearCacheByUserId(instance.id) | 184 | return clearCacheByUserId(instance.id) |
185 | } | 185 | } |
diff --git a/server/models/oauth/oauth-token.ts b/server/models/oauth/oauth-token.ts index ecf846821..08d892da4 100644 --- a/server/models/oauth/oauth-token.ts +++ b/server/models/oauth/oauth-token.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { | 1 | import { |
2 | AfterDelete, | 2 | AfterDestroy, |
3 | AfterUpdate, | 3 | AfterUpdate, |
4 | AllowNull, | 4 | AllowNull, |
5 | BelongsTo, | 5 | BelongsTo, |
@@ -126,7 +126,7 @@ export class OAuthTokenModel extends Model<OAuthTokenModel> { | |||
126 | OAuthClients: OAuthClientModel[] | 126 | OAuthClients: OAuthClientModel[] |
127 | 127 | ||
128 | @AfterUpdate | 128 | @AfterUpdate |
129 | @AfterDelete | 129 | @AfterDestroy |
130 | static removeTokenCache (token: OAuthTokenModel) { | 130 | static removeTokenCache (token: OAuthTokenModel) { |
131 | return clearCacheByToken(token.accessToken) | 131 | return clearCacheByToken(token.accessToken) |
132 | } | 132 | } |