change: disable machine status update if not brew
- fix: payload of price get unknown service ref Signed-off-by: pakintada@gmail.com <Pakin>
This commit is contained in:
parent
07977ce896
commit
79a76f5c3e
3 changed files with 30 additions and 26 deletions
|
|
@ -327,8 +327,8 @@ const handlers: Record<string, (payload: any) => void> = {
|
|||
|
||||
try {
|
||||
let raw_payload = JSON.parse(streamRawInstance[request_id]);
|
||||
let ref_from_raw = raw_payload.ref ?? '';
|
||||
let from_service_raw = raw_payload.from ?? '';
|
||||
let ref_from_raw = raw_payload.payload.ref ?? '';
|
||||
let from_service_raw = raw_payload.payload.from ?? '';
|
||||
let parsed_payload = raw_payload.payload ?? '';
|
||||
|
||||
if (from_service_raw == 'sheet-service') {
|
||||
|
|
|
|||
|
|
@ -37,9 +37,11 @@ export function handleSheetResponseFromNoti(raw_payload: any, ref: string, count
|
|||
switch (ref) {
|
||||
case 'price':
|
||||
let price_contents: PayloadFromSheet[] = raw_payload.content;
|
||||
console.log(`price content length: ${price_contents.length}`);
|
||||
let header_idx = PRICE_SHEET_DEFINITION_BY_COUNTRY[country ?? 'unknown'].get_header_idx(
|
||||
price_contents[0].header
|
||||
);
|
||||
console.log(`header idx: ${header_idx}`);
|
||||
|
||||
let lastRequestSheetInstance = get(lastRequestSheetPrice);
|
||||
let products = lastRequestSheetInstance[country ?? 'unknown'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue