perf(server): refactor and performance improvements
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { publishNoteStream } from '@/services/stream.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import { CacheableUser, User } from '@/models/entities/user.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { PollVotes, NoteWatchings, Polls, Blockings } from '@/models/index.js';
|
||||
import { Not } from 'typeorm';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { createNotification } from '../../create-notification.js';
|
||||
|
||||
export default async function(user: User, note: Note, choice: number) {
|
||||
export default async function(user: CacheableUser, note: Note, choice: number) {
|
||||
const poll = await Polls.findOne(note.id);
|
||||
|
||||
if (poll == null) throw new Error('poll not found');
|
||||
|
||||
Reference in New Issue
Block a user