feat: customer-information (#413)
* added the ability to update email as long as user has_account=false * revamped and added fix for MC-132 Co-authored-by: olivermrbl <oliver@mrbltech.com>
This commit is contained in:
committed by
GitHub
parent
897ccf475a
commit
a70e3ed0ae
@@ -1,27 +1,33 @@
|
||||
const { Customer, Address } = require("@medusajs/medusa");
|
||||
const { Customer, Address } = require("@medusajs/medusa")
|
||||
|
||||
module.exports = async (connection, data = {}) => {
|
||||
const manager = connection.manager;
|
||||
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(Customer, {
|
||||
id: "test-customer-has_account",
|
||||
email: "test4@email.com",
|
||||
has_account: true,
|
||||
})
|
||||
|
||||
await manager.insert(Address, {
|
||||
id: "test-address",
|
||||
first_name: "Lebron",
|
||||
last_name: "James",
|
||||
customer_id: "test-customer-1",
|
||||
});
|
||||
};
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user