mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(database): 🚚 Only import ORM table data from @versia/kit
This commit is contained in:
parent
2f8b85a299
commit
7a73b8db91
116 changed files with 193 additions and 202 deletions
|
|
@ -2,7 +2,8 @@ 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 { Application, type User, db } from "@versia/kit/db";
|
||||
import { Challenges } from "@versia/kit/tables";
|
||||
import { extractParams, verifySolution } from "altcha-lib";
|
||||
import chalk from "chalk";
|
||||
import { eq } from "drizzle-orm";
|
||||
|
|
@ -24,8 +25,6 @@ import { parse } from "qs";
|
|||
import type { z } from "zod";
|
||||
import { fromZodError } from "zod-validation-error";
|
||||
import { type AuthData, getFromHeader } from "~/classes/functions/user";
|
||||
import { db } from "~/drizzle/db";
|
||||
import { Challenges } from "~/drizzle/schema";
|
||||
import { config } from "~/packages/config-manager/index.ts";
|
||||
import type { ApiRouteMetadata, HonoEnv, HttpVerb } from "~/types/api";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { db } from "@versia/kit/db";
|
||||
import { Challenges } from "@versia/kit/tables";
|
||||
import { createChallenge } from "altcha-lib";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { db } from "~/drizzle/db";
|
||||
import { Challenges } from "~/drizzle/schema";
|
||||
import { config } from "~/packages/config-manager";
|
||||
|
||||
export const generateChallenge = async (
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import type { db } from "@versia/kit/db";
|
||||
import type {
|
||||
Notification,
|
||||
findManyNotifications,
|
||||
} from "~/classes/functions/notification";
|
||||
import type { Status, findManyNotes } from "~/classes/functions/status";
|
||||
import type { UserType, findManyUsers } from "~/classes/functions/user";
|
||||
import type { db } from "~/drizzle/db";
|
||||
import { config } from "~/packages/config-manager/index.ts";
|
||||
|
||||
export async function fetchTimeline<T extends UserType | Status | Notification>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue