File tree Expand file tree Collapse file tree 7 files changed +31
-6
lines changed
Expand file tree Collapse file tree 7 files changed +31
-6
lines changed Original file line number Diff line number Diff line change 11# @o2s/framework
22
3+ ## 1.5.1
4+
5+ ### Patch Changes
6+
7+ - 7fdb9c9: added delete user with id method in users module
8+
39## 1.5.0
410
511### Minor Changes
Original file line number Diff line number Diff line change 11{
22 "name" : " @o2s/framework" ,
3- "version" : " 1.5.0 " ,
3+ "version" : " 1.5.1 " ,
44 "private" : false ,
55 "license" : " MIT" ,
66 "exports" : {
Original file line number Diff line number Diff line change @@ -53,7 +53,13 @@ export class UserController {
5353
5454 @Delete ( '/me' )
5555 @Auth . Roles ( { roles : [ Auth . Constants . Roles . USER , Auth . Constants . Roles . ADMIN ] } )
56- deleteUser ( @Headers ( ) headers : AppHeaders ) {
57- return this . userService . deleteUser ( headers . authorization ) ;
56+ deleteCurrentUser ( @Headers ( ) headers : AppHeaders ) {
57+ return this . userService . deleteCurrentUser ( headers . authorization ) ;
58+ }
59+
60+ @Delete ( ':id' )
61+ @Auth . Roles ( { roles : [ Auth . Constants . Roles . USER , Auth . Constants . Roles . ADMIN ] } )
62+ deleteUser ( @Param ( ) params : Request . GetUserParams , @Headers ( ) headers : AppHeaders ) {
63+ return this . userService . deleteUser ( params , headers . authorization ) ;
5864 }
5965}
Original file line number Diff line number Diff line change @@ -27,5 +27,6 @@ export abstract class UserService {
2727 options : Users . Request . GetCustomerParams ,
2828 authorization ?: string ,
2929 ) : Observable < Customer | undefined > ;
30- abstract deleteUser ( authorization ?: string ) : Observable < void > ;
30+ abstract deleteCurrentUser ( authorization ?: string ) : Observable < void > ;
31+ abstract deleteUser ( options : Users . Request . GetUserParams , authorization ?: string ) : Observable < void > ;
3132}
Original file line number Diff line number Diff line change 11# @o2s/integrations .mocked
22
3+ ## 1.5.1
4+
5+ ### Patch Changes
6+
7+ - 7fdb9c9: added delete user with id method in users module
8+ - Updated dependencies [ 7fdb9c9]
9+ - @o2s/framework @1.5.1
10+
311## 1.5.0
412
513### Minor Changes
Original file line number Diff line number Diff line change 11{
22 "name" : " @o2s/integrations.mocked" ,
3- "version" : " 1.5.0 " ,
3+ "version" : " 1.5.1 " ,
44 "private" : false ,
55 "license" : " MIT" ,
66 "exports" : {
Original file line number Diff line number Diff line change @@ -35,7 +35,11 @@ export class UserService implements Users.Service {
3535 return of ( mapCustomer ( options . id ) ) . pipe ( responseDelay ( ) ) ;
3636 }
3737
38- deleteUser ( ) : Observable < void > {
38+ deleteCurrentUser ( ) : Observable < void > {
39+ throw new NotImplementedException ( 'Delete current user method not implemented' ) ;
40+ }
41+
42+ deleteUser ( _options : Users . Request . GetUserParams ) : Observable < void > {
3943 throw new NotImplementedException ( 'Delete user method not implemented' ) ;
4044 }
4145}
You can’t perform that action at this time.
0 commit comments