File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
packages/backend/src/usagers Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ export class UsagersController {
102
102
}
103
103
}
104
104
105
- return this . usagersService . create ( usagerDto , currentUser ) ;
105
+ const usager = this . usagersService . create ( usagerDto , currentUser ) ;
106
+ return res . status ( HttpStatus . OK ) . json ( usager ) ;
106
107
} catch ( err ) {
107
108
appLogger . error ( err ) ;
108
109
return res
Original file line number Diff line number Diff line change @@ -55,12 +55,13 @@ function setUsagerDefaultAttributes(usager: Partial<Usager>): void {
55
55
if ( ! usager ?. langue || usager . langue === "" ) {
56
56
usager . langue = null ;
57
57
}
58
-
59
- usager . lastInteraction = {
60
- dateInteraction : new Date ( ) ,
61
- colisIn : 0 ,
62
- courrierIn : 0 ,
63
- recommandeIn : 0 ,
64
- enAttente : false ,
65
- } ;
58
+ if ( ! usager . lastInteraction ) {
59
+ usager . lastInteraction = {
60
+ dateInteraction : new Date ( ) ,
61
+ colisIn : 0 ,
62
+ courrierIn : 0 ,
63
+ recommandeIn : 0 ,
64
+ enAttente : false ,
65
+ } ;
66
+ }
66
67
}
You can’t perform that action at this time.
0 commit comments