File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/my-queries-storage/src Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,17 @@ export class CompassPipelineStorage implements PipelineStorage {
32
32
return await this . userData . readOne ( id ) ;
33
33
}
34
34
35
- async createOrUpdate ( id : string , attributes : SavedPipeline ) {
35
+ async createOrUpdate (
36
+ id : string ,
37
+ attributes : Omit < SavedPipeline , 'lastModified' >
38
+ ) {
36
39
const pipelineExists = Boolean ( await this . userData . readOne ( id ) ) ;
37
40
return await ( pipelineExists
38
41
? this . updateAttributes ( id , attributes )
39
42
: this . create ( attributes ) ) ;
40
43
}
41
44
42
- private async create ( data : SavedPipeline ) {
45
+ private async create ( data : Omit < SavedPipeline , 'lastModified' > ) {
43
46
await this . userData . write ( data . id , {
44
47
...data ,
45
48
lastModified : Date . now ( ) ,
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ export interface PipelineStorage {
5
5
loadMany (
6
6
predicate : ( arg0 : SavedPipeline ) => boolean
7
7
) : Promise < SavedPipeline [ ] > ;
8
- createOrUpdate ( id : string , attributes : SavedPipeline ) : Promise < SavedPipeline > ;
8
+ createOrUpdate (
9
+ id : string ,
10
+ attributes : Omit < SavedPipeline , 'lastModified' >
11
+ ) : Promise < SavedPipeline > ;
9
12
updateAttributes (
10
13
id : string ,
11
14
attributes : Partial < SavedPipeline >
You can’t perform that action at this time.
0 commit comments