foo
This commit is contained in:
parent
ce295d2330
commit
74851ae973
|
@ -8,7 +8,7 @@ export default async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const authorization = req.headers.authorization; // authorization header from request
|
const authorization = req.headers.authorization; // authorization header from request
|
||||||
const { stripeCustomerId } = await got("http://accounts:3000/user", { headers: { authorization } }).json();
|
const { stripeCustomerId } = await got("http://accounts:3000/user", { headers: { authorization } }).json();
|
||||||
const stripeCustomer = await stripe.customers.retrieve(stripeCustomerId);
|
const stripeCustomer = await stripe.customers.retrieve(stripeCustomerId, { expand: ["subscriptions"] });
|
||||||
// const { subscriptions } = stripeCustomer;
|
// const { subscriptions } = stripeCustomer;
|
||||||
|
|
||||||
res.json(stripeCustomer);
|
res.json(stripeCustomer);
|
||||||
|
|
Reference in New Issue