DCYC55MAVFDM43TEEUMAHLPOHNQ3EJ5PEVCA7H6ZTKNQHJZK7XJAC
}));
}
break;
case 'stores':
//todo: parameters(lat, long, radius, open now or open + closed, (pickup, delivery) for future))
let stores = (await pool.query('select * from store')).rows;
//ws.subscribe('store/#'); maybe this doesn't make sense? with the filters at least, hard to be dynamic. would be cool as a store opens, it shoes up
ws.send(JSON.stringify({
response_ID: request_ID,
data: stores
}));
break;
case 'store':
let store = (await pool.query('select * from store where id = $1', [parameters.store])).rows[0];//need to join with menu_item -> variant -> product agg
if(store === undefined) {
ws.send(JSON.stringify({
response_ID: request_ID,
data: 'store does not exist'