refactor(database): 🚚 Only import ORM abstractions from @versia/kit

This commit is contained in:
Jesse Wierzbinski 2024-11-01 20:57:16 +01:00
parent f26493140f
commit 2f8b85a299
No known key found for this signature in database
100 changed files with 150 additions and 154 deletions

View file

@ -2,6 +2,7 @@ import type { Context } from "@hono/hono";
import { createMiddleware } from "@hono/hono/factory";
import type { OpenAPIHono } from "@hono/zod-openapi";
import { getLogger } from "@logtape/logtape";
import { Application, type User } from "@versia/kit/db";
import { extractParams, verifySolution } from "altcha-lib";
import chalk from "chalk";
import { eq } from "drizzle-orm";
@ -22,8 +23,6 @@ import {
import { parse } from "qs";
import type { z } from "zod";
import { fromZodError } from "zod-validation-error";
import { Application } from "~/classes/database/application";
import type { User } from "~/classes/database/user";
import { type AuthData, getFromHeader } from "~/classes/functions/user";
import { db } from "~/drizzle/db";
import { Challenges } from "~/drizzle/schema";

View file

@ -1,6 +1,6 @@
import { getLogger } from "@logtape/logtape";
import { User } from "@versia/kit/db";
import chalk from "chalk";
import { User } from "~/classes/database/user";
import type { Config } from "~/packages/config-manager";
export const checkConfig = async (config: Config) => {

View file

@ -1,4 +1,4 @@
import type { Application } from "~/classes/database/application";
import type { Application } from "@versia/kit/db";
/**
* Check if an OAuth application is valid for a route