Skip to content

Commit

Permalink
mmm
Browse files Browse the repository at this point in the history
  • Loading branch information
apaleslimghost committed Dec 4, 2018
1 parent 94ccbef commit 6b08cdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/x-gift-article/src/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 6b08cdb

Please sign in to comment.