Commit 7ce0cda 1 parent 272b974 commit 7ce0cda Copy full SHA for 7ce0cda
File tree 2 files changed +14
-9
lines changed
temporal/relocation/activities/source_region/front
2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ import { Op } from "sequelize";
12
12
import type { Authenticator } from "@app/lib/auth" ;
13
13
import { BaseResource } from "@app/lib/resources/base_resource" ;
14
14
import { MembershipModel } from "@app/lib/resources/storage/models/membership" ;
15
- import { UserMetadataModel , UserModel } from "@app/lib/resources/storage/models/user" ;
15
+ import {
16
+ UserMetadataModel ,
17
+ UserModel ,
18
+ } from "@app/lib/resources/storage/models/user" ;
16
19
import type { ReadonlyAttributesType } from "@app/lib/resources/storage/types" ;
17
20
18
21
export interface SearchMembersPaginationParams {
@@ -215,20 +218,20 @@ export class UserResource extends BaseResource<UserModel> {
215
218
return UserMetadataModel . findOne ( {
216
219
where : {
217
220
userId,
218
- key
219
- }
220
- } )
221
+ key,
222
+ } ,
223
+ } ) ;
221
224
}
222
225
223
226
static async getAllMetadata ( users : ModelId [ ] ) {
224
227
return UserMetadataModel . findAll ( {
225
228
where : {
226
229
userId : {
227
230
[ Op . in ] : users ,
228
- }
231
+ } ,
229
232
} ,
230
233
raw : true ,
231
- } )
234
+ } ) ;
232
235
}
233
236
234
237
static async setMetadata ( userId : ModelId , key : string , value : string ) {
@@ -256,8 +259,8 @@ export class UserResource extends BaseResource<UserModel> {
256
259
return UserMetadataModel . destroy ( {
257
260
where : {
258
261
userId,
259
- }
260
- } )
262
+ } ,
263
+ } ) ;
261
264
}
262
265
263
266
fullName ( ) : string {
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ export async function readCoreEntitiesFromSourceRegion({
65
65
} ) ;
66
66
67
67
// Fetch all associated users metadata of the workspace.
68
- const userMetadata = await UserResource . getAllMetadata ( memberships . map ( ( m ) => m . userId ) ) ;
68
+ const userMetadata = await UserResource . getAllMetadata (
69
+ memberships . map ( ( m ) => m . userId )
70
+ ) ;
69
71
70
72
const subscriptions = await frontSequelize . query < { planId : ModelId } > (
71
73
'SELECT * FROM subscriptions WHERE "workspaceId" = :workspaceId' ,
You can’t perform that action at this time.
0 commit comments