- implementing immutable.js

This commit is contained in:
2019-07-17 03:21:23 -04:00
parent 8ecf036cc4
commit 434a1ded24
39 changed files with 1123 additions and 187 deletions

View File

@@ -3,9 +3,11 @@ const apiUrl = 'http://localhost:3001';
const endpoints = {
// Events and Items
GET_EVENTS: '/events',
GET_ITEMS: '/items?eventId=:event_id',
// GET_ITEMS: '/items?eventId=:event_id',
GET_ITEMS: '/items',
// Auction Interactions
// GET_STATUS: '/auction/:event_id',
GET_STATUS: '/auction',
PLACE_BID: '/bids/:item_id',
PURCHASE_ITEM: '/sales',
@@ -30,8 +32,8 @@ const cacheBuster = () => {
export const getEndpointUrl = (endpoint) => {
if (!endpoints[endpoint]) {
return throw new Error('Invalid API endpoint specified');
throw new Error('Invalid API endpoint specified');
}
return `${apiUrl}${endpoints[endpoint]}${cacheBuster()}`;
return `${apiUrl}${endpoints[endpoint]}`; //`${cacheBuster()}`;
};