chore (backend): fix imports

This commit is contained in:
naskya 2024-04-20 23:04:12 +09:00
parent dd3ad89b64
commit a2699e6687
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
6 changed files with 4 additions and 35 deletions

View file

@ -1,6 +1,6 @@
import { redisClient } from "@/db/redis.js"; import { redisClient } from "@/db/redis.js";
import { encode, decode } from "msgpackr"; import { encode, decode } from "msgpackr";
import { ChainableCommander } from "ioredis"; import type { ChainableCommander } from "ioredis";
export class Cache<T> { export class Cache<T> {
private ttl: number; private ttl: number;

View file

@ -32,7 +32,7 @@ import Followers from "./activitypub/followers.js";
import Outbox, { packActivity } from "./activitypub/outbox.js"; import Outbox, { packActivity } from "./activitypub/outbox.js";
import { serverLogger } from "./index.js"; import { serverLogger } from "./index.js";
import config from "@/config/index.js"; import config from "@/config/index.js";
import Koa from "koa"; import type Koa from "koa";
import * as crypto from "node:crypto"; import * as crypto from "node:crypto";
import { inspect } from "node:util"; import { inspect } from "node:util";
import type { IActivity } from "@/remote/activitypub/type.js"; import type { IActivity } from "@/remote/activitypub/type.js";

View file

@ -1,4 +1,4 @@
import { Readable, ReadableOptions } from "node:stream"; import { Readable, type ReadableOptions } from "node:stream";
import { Buffer } from "node:buffer"; import { Buffer } from "node:buffer";
import * as fs from "node:fs"; import * as fs from "node:fs";

View file

@ -1,4 +1,3 @@
import type { KVs } from "../core.js";
import Chart from "../core.js"; import Chart from "../core.js";
import type { User } from "@/models/entities/user.js"; import type { User } from "@/models/entities/user.js";
import { name, schema } from "./entities/active-users.js"; import { name, schema } from "./entities/active-users.js";

View file

@ -1,4 +1,5 @@
import { Window } from "happy-dom"; import { Window } from "happy-dom";
import type { HTMLAnchorElement, HTMLLinkElement } from "happy-dom";
import config from "@/config/index.js"; import config from "@/config/index.js";
async function getRelMeLinks(url: string): Promise<string[]> { async function getRelMeLinks(url: string): Promise<string[]> {

View file

@ -3,7 +3,6 @@ import type { Note } from "@/models/entities/note.js";
import type { User } from "@/models/entities/user.js"; import type { User } from "@/models/entities/user.js";
import { import {
NoteUnreads, NoteUnreads,
Users,
Followings, Followings,
ChannelFollowings, ChannelFollowings,
} from "@/models/index.js"; } from "@/models/index.js";
@ -120,34 +119,4 @@ export default async function (
]), ]),
}); });
} }
// if (readAntennaNotes.length > 0) {
// await AntennaNotes.update(
// {
// antennaId: In(myAntennas.map((a) => a.id)),
// noteId: In(readAntennaNotes.map((n) => n.id)),
// },
// {
// read: true,
// },
// );
// // TODO: まとめてクエリしたい
// for (const antenna of myAntennas) {
// const count = await AntennaNotes.countBy({
// antennaId: antenna.id,
// read: false,
// });
// if (count === 0) {
// publishMainStream(userId, "readAntenna", antenna);
// }
// }
// Users.getHasUnreadAntenna(userId).then((unread) => {
// if (!unread) {
// publishMainStream(userId, "readAllAntennas");
// }
// });
// }
} }