mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-01-08 13:27:55 -05:00
update deno fmt, update std version, sonar fix
This commit is contained in:
@ -10,7 +10,7 @@ export const heatmapPng = async (requestEvent: Deno.RequestEvent) => {
|
||||
requestEvent.respondWith(
|
||||
new Response(file, {
|
||||
status: Status.OK,
|
||||
statusText: STATUS_TEXT.get(Status.OK),
|
||||
statusText: STATUS_TEXT[Status.OK],
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
STATUS_TEXT,
|
||||
} from '../../deps.ts';
|
||||
|
||||
const genericResponse = (customText: string, status: Status) => new Response(customText || STATUS_TEXT.get(status), { status: status, statusText: STATUS_TEXT.get(status) });
|
||||
const genericResponse = (customText: string, status: Status) => new Response(customText || STATUS_TEXT[status], { status: status, statusText: STATUS_TEXT[status] });
|
||||
|
||||
export default {
|
||||
BadRequest: (customText: string) => genericResponse(customText, Status.BadRequest),
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
// Discordeno deps
|
||||
cache,
|
||||
cacheHandlers,
|
||||
// imagescript
|
||||
// imagescript dep
|
||||
is,
|
||||
// Log4Deno deps
|
||||
log,
|
||||
@ -160,9 +160,9 @@ const updateHeatmapPng = async () => {
|
||||
let minRollCnt = Infinity;
|
||||
let maxRollCnt = 0;
|
||||
// determine min and max values
|
||||
for (let hour = 0; hour < heatmapData.length; hour++) {
|
||||
for (let day = 0; day < weekDays.length; day++) {
|
||||
const rollCnt = heatmapData[hour][weekDays[day]];
|
||||
for (const hour of heatmapData) {
|
||||
for (const day of weekDays) {
|
||||
const rollCnt = hour[day];
|
||||
log(LT.LOG, `updateHeatmapPng | finding min/max | min: ${minRollCnt} max: ${maxRollCnt} curr: ${rollCnt}`);
|
||||
if (rollCnt > maxRollCnt) {
|
||||
maxRollCnt = rollCnt;
|
||||
|
||||
Reference in New Issue
Block a user