foo
This commit is contained in:
parent
775e74dd15
commit
ce295d2330
|
@ -9,9 +9,9 @@ export default async (req, res) => {
|
||||||
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);
|
||||||
const { subscriptions } = stripeCustomer;
|
// const { subscriptions } = stripeCustomer;
|
||||||
|
|
||||||
res.json(subscriptions);
|
res.json(stripeCustomer);
|
||||||
} catch ({ message }) {
|
} catch ({ message }) {
|
||||||
res.status(StatusCodes.BAD_REQUEST).json({ error: { message } });
|
res.status(StatusCodes.BAD_REQUEST).json({ error: { message } });
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue