feat: update customer groups (#1075)
* update customer service prep * expand on the update customer groups test case * add the test case for customer group update * docs for `groups` prop on update customer endpoint * refactor, update comments * expend on integration tests, add customer mock with a group * refactor to use `customerGroupService.list` method * update units * remove `updateCustomerGroups` * fix rebase conflict * fix customer seed data, add JoinTable on groups * group retrieval using the expand param * fix: use `buildQuery_` * fix: validation for `groups`, enable `expand`param on update customer endpoint * fix: remove fileds form the `FilterableCustomerGroupProps` * fix: spearate body/query validation Co-authored-by: fPolic <frane@medusajs.com>
This commit is contained in:
@@ -36,8 +36,24 @@ module.exports = async (connection, data = {}) => {
|
||||
has_account: true,
|
||||
})
|
||||
|
||||
await manager.insert(Customer, {
|
||||
id: "test-customer-5",
|
||||
email: "test5@email.com",
|
||||
groups: [{ id: "test-group-5", name: "test-group-5" }],
|
||||
})
|
||||
|
||||
await manager.insert(CustomerGroup, {
|
||||
id: "customer-group-1",
|
||||
name: "vip-customers",
|
||||
})
|
||||
|
||||
await manager.insert(CustomerGroup, {
|
||||
id: "test-group-4",
|
||||
name: "test-group-4",
|
||||
})
|
||||
|
||||
await manager.insert(CustomerGroup, {
|
||||
id: "test-group-5",
|
||||
name: "test-group-5",
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user