sonar fix
This commit is contained in:
parent
c71f6f76e4
commit
51924b7f14
|
@ -153,7 +153,9 @@ const hourPixels: Array<Array<number>> = [
|
|||
const updateHeatmapPng = async () => {
|
||||
const baseHeatmap = Deno.readFileSync('./src/endpoints/gets/heatmap-base.png');
|
||||
const heatmap = await is.decode(baseHeatmap);
|
||||
if (heatmap instanceof is.Image) {
|
||||
if (!(heatmap instanceof is.Image)) {
|
||||
return;
|
||||
}
|
||||
// Get latest data from DB
|
||||
const heatmapData = await dbClient.query('SELECT * FROM roll_time_heatmap ORDER BY hour;').catch((e) => utils.commonLoggers.dbError('intervals.ts:148', 'query', e));
|
||||
|
||||
|
@ -193,7 +195,6 @@ const updateHeatmapPng = async () => {
|
|||
}
|
||||
|
||||
Deno.writeFileSync('./src/endpoints/gets/heatmap.png', await heatmap.encode());
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
|
|
Loading…
Reference in New Issue