Skip to content

Commit

Permalink
Executable field for ActivitySpec view
Browse files Browse the repository at this point in the history
  • Loading branch information
sarithapillai8 committed Jan 19, 2022
1 parent e0c723a commit ef3a147
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/repository/couch/ActivitySpecRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class ActivitySpecRepository implements ActivitySpecInterface {
id: x.doc._id,
...x.doc,
_id: undefined,
executable: !!id ? x.doc.executable : undefined,
_rev: undefined,
}))
}
Expand Down
7 changes: 5 additions & 2 deletions src/repository/mongo/ActivitySpecRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ export class ActivitySpecRepository implements ActivitySpecInterface {
? await MongoClientDB.collection("activity_spec").find({$or: [ { _deleted: false, _id: id }, { _deleted: undefined, _id: id } ]}).maxTimeMS(60000).toArray()
: await MongoClientDB.collection("activity_spec").find({$or: [ { _deleted: false }, { _deleted: undefined } ]}).maxTimeMS(60000).toArray()
return (data as any).map((x: any) => ({
id: x._id,
id: x._id,
...x,
_id: undefined,
__v: undefined,
executable: !!id ? x.executable : undefined,
_deleted: undefined,
}))
}
Expand All @@ -27,6 +28,7 @@ export class ActivitySpecRepository implements ActivitySpecInterface {
temporal_slice_schema: object.temporal_slice_schema ?? {},
settings_schema: object.settings_schema ?? {},
category: object.category ?? null,
executable: object.executable ?? null,
_deleted: false,
} as any)
return {}
Expand All @@ -45,7 +47,8 @@ export class ActivitySpecRepository implements ActivitySpecInterface {
static_data_schema: object.static_data_schema ?? orig.static_data_schema,
temporal_slice_schema: object.temporal_slice_schema ?? orig.temporal_slice_schema,
settings_schema: object.settings_schema ?? orig.settings_schema,
category: object.category ?? orig.category
category: object.category ?? orig.category,
executable: object.executable ?? orig.executable
},
}
)
Expand Down

0 comments on commit ef3a147

Please sign in to comment.