fix (backend): fix imports

This commit is contained in:
naskya 2024-05-19 20:11:21 +09:00
parent 08233bc0af
commit 9fd98cc5f7
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
3 changed files with 6 additions and 6 deletions

View file

@ -11,7 +11,7 @@ import {
Polls, Polls,
Channels, Channels,
Notes, Notes,
ScheduledNoteCreations, ScheduledNote,
} from "../index.js"; } from "../index.js";
import type { Packed } from "@/misc/schema.js"; import type { Packed } from "@/misc/schema.js";
import { countReactions, decodeReaction, nyaify } from "backend-rs"; import { countReactions, decodeReaction, nyaify } from "backend-rs";
@ -202,7 +202,7 @@ export const NoteRepository = db.getRepository(Note).extend({
let scheduledAt: string | undefined; let scheduledAt: string | undefined;
if (note.visibility === "specified" && note.visibleUserIds.length === 0) { if (note.visibility === "specified" && note.visibleUserIds.length === 0) {
scheduledAt = ( scheduledAt = (
await ScheduledNoteCreations.findOneBy({ await ScheduledNote.findOneBy({
noteId: note.id, noteId: note.id,
}) })
)?.scheduledAt?.toISOString(); )?.scheduledAt?.toISOString();

View file

@ -1,4 +1,4 @@
import { Users, Notes, ScheduledNoteCreations } from "@/models/index.js"; import { Users, Notes, ScheduledNotes } from "@/models/index.js";
import type { DbUserScheduledCreateNoteData } from "@/queue/types.js"; import type { DbUserScheduledCreateNoteData } from "@/queue/types.js";
import { queueLogger } from "../../logger.js"; import { queueLogger } from "../../logger.js";
import type Bull from "bull"; import type Bull from "bull";
@ -32,7 +32,7 @@ export async function scheduledCreateNote(
return; return;
} }
await ScheduledNoteCreations.delete({ await ScheduledNotes.delete({
noteId: note.id, noteId: note.id,
userId: user.id, userId: user.id,
}); });

View file

@ -7,7 +7,7 @@ import {
Notes, Notes,
Channels, Channels,
Blockings, Blockings,
ScheduledNoteCreations, ScheduledNote,
} from "@/models/index.js"; } from "@/models/index.js";
import type { DriveFile } from "@/models/entities/drive-file.js"; import type { DriveFile } from "@/models/entities/drive-file.js";
import type { Note } from "@/models/entities/note.js"; import type { Note } from "@/models/entities/note.js";
@ -346,7 +346,7 @@ export default define(meta, paramDef, async (ps, user) => {
false, false,
delay delay
? async (note) => { ? async (note) => {
await ScheduledNoteCreations.insert({ await ScheduledNote.insert({
id: genId(), id: genId(),
noteId: note.id, noteId: note.id,
userId: user.id, userId: user.id,