File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/management/identities Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 11export enum IdentityState {
22 SYNCED = 2 ,
3- TO_SYNCED = 1 ,
3+ TO_SYNC = 1 ,
44 UNKNOWN = 0 ,
55 TO_CREATE = - 1 ,
66 TO_COMPLETE = - 2 ,
Original file line number Diff line number Diff line change @@ -34,15 +34,16 @@ import { IdentityState } from './_enums/states.enum';
3434 } ) ;
3535
3636 // Pre save hook
37- // This hook is used to set the state to TO_SYNCED if the state is TO_CREATE
37+ // This hook is used to set the state to TO_SYNC if the state is TO_CREATE
3838 schema . pre ( 'save' , async function ( next ) {
3939 console . log ( 'pre save' ) ;
40- if ( this . state === IdentityState . TO_CREATE ) this . state = IdentityState . TO_SYNCED ;
40+ if ( this . state === IdentityState . TO_CREATE ) this . state = IdentityState . TO_SYNC ;
4141 next ( ) ;
4242 } ) ;
4343
4444 return schema ;
4545 } ,
46+ //TODO: Si le schema est save, pousser dans la queue de sync
4647 } ,
4748 ] ) ,
4849 ] ,
You can’t perform that action at this time.
0 commit comments