Ensure services is always an array
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
@@ -40,7 +40,8 @@ async function arrDepBoard(CRS){
|
||||
crs: CRS.toUpperCase()
|
||||
};
|
||||
const api = new ldb(ldbKey,false);
|
||||
return await api.call('GetArrDepBoardWithDetails', options, false, false);
|
||||
let d = await api.call('GetArrDepBoardWithDetails', options, false, false);
|
||||
return await util.cleanData(d);
|
||||
} catch (err) {
|
||||
log.out(`ldbService.arrDepBoard: Lookup Failed for: ${CRS}`, 'warn');
|
||||
return {
|
||||
@@ -62,10 +63,7 @@ async function arrDepBoardStaff(CRS) {
|
||||
services: 'PBS'
|
||||
};
|
||||
const api = new ldb(ldbsvKey,true);
|
||||
let data = await api.call(
|
||||
'GetArrivalDepartureBoardByCRS',
|
||||
options, false, false);
|
||||
return await util.cleanData(data);
|
||||
return await api.call('GetArrivalDepartureBoardByCRS',options,false,false);
|
||||
} catch (err) {
|
||||
log.out(`ldbService.arrDepBoardStaff: Lookup Failed for: ${CRS}`, 'warn');
|
||||
log.out(`ldbService.arrDepBoardStaff: ${err}`);
|
||||
|
||||
Reference in New Issue
Block a user