Skip to content

Commit e6121b9

Browse files
na3ddisplague
authored andcommitted
Merge pull request #16 from eatonphil/billing-invoice
Fix things up after rebase
2 parents 931691a + ad6facd commit e6121b9

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/api/generic/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const generics = [
33
'distributions', 'regions', 'types', 'linodes', 'volumes', 'stackscripts', 'kernels', 'domains',
44
'nodebalancers', 'profile', 'account', 'events', 'tokens', 'clients', 'users', 'tickets', 'apps',
5+
'invoices',
56
];
67

78
// eslint-disable-next-line global-require

src/api/generic/invoices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const config = genConfig({
88
supports: [ONE, MANY],
99
subresources: {
1010
_items: {
11-
singular: 'items',
11+
plural: 'items',
1212
endpoint: id => `/account/invoices/${id}/items`,
1313
supports: [ONE],
1414
},

src/billing/layouts/IndexPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { push } from 'react-router-redux';
55
import { Tabs } from 'linode-components/tabs';
66

77
import { setAnalytics, setTitle } from '~/actions';
8-
import { account, invoices } from '~/api';
8+
import api from '~/api';
99

1010

1111
export class IndexPage extends Component {
1212
static async preload({ dispatch }) {
13-
await Promise.all([account.one(), invoices.all()].map(r => dispatch(r)));
13+
await Promise.all([api.account.one(), api.invoices.all()].map(r => dispatch(r)));
1414
}
1515

1616
componentDidMount() {

src/billing/layouts/InvoicePage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import moment from 'moment-timezone';
55
import { getStorage } from '~/storage';
66
import { Card, CardHeader } from 'linode-components/cards';
77
import { Table } from 'linode-components/tables';
8-
import { invoices } from '~/api';
8+
import api from '~/api';
99

1010
import { setSource } from '~/actions/source';
1111

1212

1313
export class InvoicePage extends Component {
1414
static async preload({ dispatch, getState }, { invoiceId }) {
15-
await dispatch(invoices.items.one([invoiceId]));
15+
await dispatch(api.invoices.items.one([invoiceId]));
1616
}
1717

1818
componentDidMount() {

0 commit comments

Comments
 (0)