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 {
3232 return await this . userData . readOne ( id ) ;
3333 }
3434
35- async createOrUpdate ( id : string , attributes : SavedPipeline ) {
35+ async createOrUpdate (
36+ id : string ,
37+ attributes : Omit < SavedPipeline , 'lastModified' >
38+ ) {
3639 const pipelineExists = Boolean ( await this . userData . readOne ( id ) ) ;
3740 return await ( pipelineExists
3841 ? this . updateAttributes ( id , attributes )
3942 : this . create ( attributes ) ) ;
4043 }
4144
42- private async create ( data : SavedPipeline ) {
45+ private async create ( data : Omit < SavedPipeline , 'lastModified' > ) {
4346 await this . userData . write ( data . id , {
4447 ...data ,
4548 lastModified : Date . now ( ) ,
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ export interface PipelineStorage {
55 loadMany (
66 predicate : ( arg0 : SavedPipeline ) => boolean
77 ) : Promise < SavedPipeline [ ] > ;
8- createOrUpdate ( id : string , attributes : SavedPipeline ) : Promise < SavedPipeline > ;
8+ createOrUpdate (
9+ id : string ,
10+ attributes : Omit < SavedPipeline , 'lastModified' >
11+ ) : Promise < SavedPipeline > ;
912 updateAttributes (
1013 id : string ,
1114 attributes : Partial < SavedPipeline >
You can’t perform that action at this time.
0 commit comments