mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: ⚰️ Remove dead code and useless files
This commit is contained in:
parent
98f3ab23d8
commit
83275be536
14 changed files with 3 additions and 185 deletions
|
|
@ -24,7 +24,6 @@ import { objectToInboxRequest } from "~/database/entities/federation";
|
|||
import { addInstanceIfNotExists } from "~/database/entities/instance";
|
||||
import {
|
||||
type UserWithRelations,
|
||||
findFirstUser,
|
||||
findManyUsers,
|
||||
} from "~/database/entities/user";
|
||||
import { db } from "~/drizzle/db";
|
||||
|
|
@ -75,15 +74,15 @@ export class User extends BaseInterface<typeof Users, UserWithRelations> {
|
|||
sql: SQL<unknown> | undefined,
|
||||
orderBy: SQL<unknown> | undefined = desc(Users.id),
|
||||
) {
|
||||
const found = await findFirstUser({
|
||||
const found = await findManyUsers({
|
||||
where: sql,
|
||||
orderBy,
|
||||
});
|
||||
|
||||
if (!found) {
|
||||
if (!found[0]) {
|
||||
return null;
|
||||
}
|
||||
return new User(found);
|
||||
return new User(found[0]);
|
||||
}
|
||||
|
||||
static async manyFromSql(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue