2019-02-03 11:09:03 +00:00
|
|
|
const uuid = require('uuid');
|
|
|
|
|
|
|
|
const stores = [
|
|
|
|
{
|
2019-02-04 18:08:19 +00:00
|
|
|
id: 'cc406ed9-fc02-4185-b073-8c12b61b5c79',
|
2019-02-03 11:09:03 +00:00
|
|
|
name: 'Den Olijfboom',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: '5f2919aa-333a-4745-8166-3002ab30de0e',
|
|
|
|
name: 'Pizza Talia'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2019-02-04 18:08:19 +00:00
|
|
|
function createStore({ name }) {
|
2019-02-03 11:09:03 +00:00
|
|
|
const newStore = { id: uuid(), name };
|
|
|
|
stores.push(newStore);
|
|
|
|
return newStore;
|
|
|
|
}
|
|
|
|
|
2019-02-04 18:08:19 +00:00
|
|
|
function getStores() {
|
2019-02-03 11:09:03 +00:00
|
|
|
return stores;
|
2019-02-04 18:08:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
createStore,
|
|
|
|
getStores
|
|
|
|
};
|