added tooling (eslint, typescript and prettier)

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-11-02 12:14:37 +01:00
parent 575b3c23bf
commit 493e1b7650
82 changed files with 1890 additions and 1363 deletions

View File

@@ -1,8 +1,8 @@
import { validateSdkRequest } from "@/server/auth";
import { db } from "@/server/db";
import { createError, handleError } from "@/server/exceptions";
import type { NextApiRequest, NextApiResponse } from "next";
import randomAnimalName from "random-animal-name";
import { validateSdkRequest } from '@/server/auth';
import { db } from '@/server/db';
import { createError, handleError } from '@/server/exceptions';
import type { NextApiRequest, NextApiResponse } from 'next';
import randomAnimalName from 'random-animal-name';
interface Request extends NextApiRequest {
body: {
@@ -12,8 +12,8 @@ interface Request extends NextApiRequest {
}
export default async function handler(req: Request, res: NextApiResponse) {
if (req.method !== "POST") {
return handleError(res, createError(405, "Method not allowed"));
if (req.method !== 'POST') {
return handleError(res, createError(405, 'Method not allowed'));
}
try {