Fixed lint issues.

This commit is contained in:
Mike Cao committed 2023-02-07 16:29:25 -08:00
1 parent 94726239aa
commit ad5e34a894
10 files changed
+58 -72

No files matched your search

+6 -6
View File
@@ -90,15 +90,15 @@ export default async (
});
if (type === 'language') {
let combined = {};
const combined = {};
for (let { x, y } of data) {
x = String(x).toLowerCase().split('-')[0];
for (const { x, y } of data) {
const key = String(x).toLowerCase().split('-')[0];
if (!combined[x]) {
combined[x] = { x, y };
if (!combined[key]) {
combined[key] = { x, y };
} else {
combined[x].y += y;
combined[key].y += y;
}
}
+1 -3
View File
@@ -6,8 +6,6 @@ import { NextApiResponse } from 'next';
import { methodNotAllowed, ok, unauthorized } from 'next-basics';
import { createWebsite, getUserWebsites } from 'queries';
export interface WebsitesRequestQuery {}
export interface WebsitesRequestBody {
name: string;
domain: string;
@@ -16,7 +14,7 @@ export interface WebsitesRequestBody {
}
export default async (
req: NextApiRequestQueryBody<WebsitesRequestQuery, WebsitesRequestBody>,
req: NextApiRequestQueryBody<any, WebsitesRequestBody>,
res: NextApiResponse,
) => {
await useCors(req, res);