Skip to content

Commit

Permalink
feat: 馃幐 add cart in signup and users api response
Browse files Browse the repository at this point in the history
  • Loading branch information
yeukfei02 committed Apr 26, 2022
1 parent 4a6830b commit cdb21d4
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/signup/response/signup.response.ts
Expand Up @@ -51,6 +51,9 @@ export class Users {

@ApiProperty({ default: [], isArray: true })
todos: any[];

@ApiProperty()
cart: any;
}

export class SignupResponse {
Expand Down
1 change: 1 addition & 0 deletions src/signup/signup.service.ts
Expand Up @@ -40,6 +40,7 @@ export class SignupService {
posts: true,
comments: true,
todos: true,
cart: true,
},
});

Expand Down
3 changes: 3 additions & 0 deletions src/user/response/create-user.response.ts
Expand Up @@ -51,6 +51,9 @@ export class Users {

@ApiProperty({ default: [], isArray: true })
todos: any[];

@ApiProperty()
cart: any;
}

export class CreateUserResponse {
Expand Down
3 changes: 3 additions & 0 deletions src/user/response/delete-user-by-id.response.ts
Expand Up @@ -129,6 +129,9 @@ export class User {

@ApiProperty({ default: [], isArray: true })
todos: any[];

@ApiProperty()
cart: any;
}
export class DeleteUserByIdResponse {
@ApiProperty()
Expand Down
3 changes: 3 additions & 0 deletions src/user/response/get-user-by-id.response.ts
Expand Up @@ -129,6 +129,9 @@ export class User {

@ApiProperty({ default: [], isArray: true })
todos: any[];

@ApiProperty()
cart: any;
}
export class GetUserByIdResponse {
@ApiProperty()
Expand Down
3 changes: 3 additions & 0 deletions src/user/response/update-user-by-id.response.ts
Expand Up @@ -129,6 +129,9 @@ export class User {

@ApiProperty({ default: [], isArray: true })
todos: any[];

@ApiProperty()
cart: any;
}
export class UpdateUserByIdResponse {
@ApiProperty()
Expand Down
4 changes: 4 additions & 0 deletions src/user/user.service.ts
Expand Up @@ -41,6 +41,7 @@ export class UserService {
posts: true,
comments: true,
todos: true,
cart: true,
},
});
return users;
Expand Down Expand Up @@ -74,6 +75,7 @@ export class UserService {
posts: true,
comments: true,
todos: true,
cart: true,
},
});
return users;
Expand Down Expand Up @@ -104,6 +106,7 @@ export class UserService {
posts: true,
comments: true,
todos: true,
cart: true,
},
});
return users;
Expand All @@ -119,6 +122,7 @@ export class UserService {
posts: true,
comments: true,
todos: true,
cart: true,
},
});
return users;
Expand Down

0 comments on commit cdb21d4

Please sign in to comment.