From 6b08cdb39961c3c0b998d88fed29eceb3a8fce2d Mon Sep 17 00:00:00 2001 From: Matt Brennan Date: Tue, 4 Dec 2018 14:38:38 +0000 Subject: [PATCH] mmm --- components/x-gift-article/src/lib/api.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/x-gift-article/src/lib/api.js b/components/x-gift-article/src/lib/api.js index 74ad573d3..0b5594660 100644 --- a/components/x-gift-article/src/lib/api.js +++ b/components/x-gift-article/src/lib/api.js @@ -28,12 +28,12 @@ export default class ApiClient { async getGiftArticleAllowance() { try { - const { credits } = await this.fetchJson('/article/gift-credits'); + const json = await this.fetchJson('/article/gift-credits'); return { - monthlyAllowance: credits.allowance, - giftCredits: credits.remainingCredits, - nextRenewalDate: credits.renewalDate + monthlyAllowance: json.allowance, + giftCredits: json.remainingCredits, + nextRenewalDate: json.renewalDate }; } catch (e) { return { monthlyAllowance: undefined, giftCredits: undefined, nextRenewalDate: undefined };