fix(medusa): Add querying func. on customer retrievals (#181)

This commit is contained in:
Oliver Windall Juhl authored and GitHub committed 2021-02-23 13:40:49 +01:00
1 parent 587a464e83
commit 22be418ec1
4 files changed
+225 -4

No files matched your search

@@ -0,0 +1,27 @@
const { Customer, Address } = require("@medusajs/medusa");
module.exports = async (connection, data = {}) => {
const manager = connection.manager;
await manager.insert(Customer, {
id: "test-customer-1",
email: "test1@email.com",
});
await manager.insert(Customer, {
id: "test-customer-2",
email: "test2@email.com",
});
await manager.insert(Customer, {
id: "test-customer-3",
email: "test3@email.com",
});
await manager.insert(Address, {
id: "test-address",
first_name: "Lebron",
last_name: "James",
customer_id: "test-customer-1",
});
};