oh lord. prettier eslint and all that
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import { createTRPCRouter, protectedProcedure } from '@/server/api/trpc';
|
||||
import { db } from '@/server/db';
|
||||
import {
|
||||
type IChartEvent,
|
||||
type IChartInputWithDates,
|
||||
type IChartRange,
|
||||
} from '@/types';
|
||||
import type { IChartEvent, IChartInputWithDates, IChartRange } from '@/types';
|
||||
import { getDaysOldDate } from '@/utils/date';
|
||||
import { toDots } from '@/utils/object';
|
||||
import { zChartInputWithDates } from '@/utils/validation';
|
||||
@@ -157,11 +153,11 @@ function isJsonPath(property: string) {
|
||||
return property.startsWith('properties');
|
||||
}
|
||||
|
||||
type ResultItem = {
|
||||
interface ResultItem {
|
||||
label: string | null;
|
||||
count: number;
|
||||
date: string;
|
||||
};
|
||||
}
|
||||
|
||||
function propertyNameToSql(name: string) {
|
||||
if (name.includes('.')) {
|
||||
|
||||
@@ -2,16 +2,16 @@ import { createTRPCRouter, protectedProcedure } from '@/server/api/trpc';
|
||||
import { db } from '@/server/db';
|
||||
import { getDashboardBySlug } from '@/server/services/dashboard.service';
|
||||
import { getProjectBySlug } from '@/server/services/project.service';
|
||||
import {
|
||||
type IChartBreakdown,
|
||||
type IChartEvent,
|
||||
type IChartEventFilter,
|
||||
type IChartInput,
|
||||
type IChartRange,
|
||||
import type {
|
||||
IChartBreakdown,
|
||||
IChartEvent,
|
||||
IChartEventFilter,
|
||||
IChartInput,
|
||||
IChartRange,
|
||||
} from '@/types';
|
||||
import { alphabetIds } from '@/utils/constants';
|
||||
import { zChartInput } from '@/utils/validation';
|
||||
import { type Report as DbReport } from '@prisma/client';
|
||||
import type { Report as DbReport } from '@prisma/client';
|
||||
import { z } from 'zod';
|
||||
|
||||
function transformFilter(
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
import { getServerAuthSession } from '@/server/auth';
|
||||
import { db } from '@/server/db';
|
||||
import { initTRPC, TRPCError } from '@trpc/server';
|
||||
import { type CreateNextContextOptions } from '@trpc/server/adapters/next';
|
||||
import { type Session } from 'next-auth';
|
||||
import type { CreateNextContextOptions } from '@trpc/server/adapters/next';
|
||||
import type { Session } from 'next-auth';
|
||||
import superjson from 'superjson';
|
||||
import { ZodError } from 'zod';
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import { db } from '@/server/db';
|
||||
import { verifyPassword } from '@/server/services/hash.service';
|
||||
import { type GetServerSidePropsContext, type NextApiRequest } from 'next';
|
||||
import {
|
||||
getServerSession,
|
||||
type DefaultSession,
|
||||
type NextAuthOptions,
|
||||
} from 'next-auth';
|
||||
import type { GetServerSidePropsContext, NextApiRequest } from 'next';
|
||||
import { getServerSession } from 'next-auth';
|
||||
import type { DefaultSession, NextAuthOptions } from 'next-auth';
|
||||
import Credentials from 'next-auth/providers/credentials';
|
||||
|
||||
import { createError } from './exceptions';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { type NextApiResponse } from 'next';
|
||||
import type { NextApiResponse } from 'next';
|
||||
|
||||
import { type MixanErrorResponse, type MixanIssue } from '@mixan/types';
|
||||
import type { MixanErrorResponse, MixanIssue } from '@mixan/types';
|
||||
|
||||
export class HttpError extends Error {
|
||||
public status: number;
|
||||
@@ -25,7 +25,7 @@ export class HttpError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
export function createIssues(arr: Array<MixanIssue>) {
|
||||
export function createIssues(arr: MixanIssue[]) {
|
||||
throw new HttpError(400, 'Issues', arr);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
type GetServerSidePropsContext,
|
||||
type GetServerSidePropsResult,
|
||||
} from 'next';
|
||||
import type { GetServerSidePropsContext, GetServerSidePropsResult } from 'next';
|
||||
|
||||
import { getServerAuthSession } from './auth';
|
||||
import { db } from './db';
|
||||
|
||||
Reference in New Issue
Block a user