refactor: migrate to typeorm 3.0 (#8443)

* wip

* wip

* wip

* Update following.ts

* wip

* wip

* wip

* Update resolve-user.ts

* maxQueryExecutionTime

* wip

* wip
This commit is contained in:
syuilo 2022-03-26 15:34:00 +09:00 committed by GitHub
parent 41c87074e6
commit 1c67c26bd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
325 changed files with 1314 additions and 1494 deletions

View file

@ -2,6 +2,7 @@ import config from '@/config/index.js';
import { NoteReaction } from '@/models/entities/note-reaction.js';
import { Note } from '@/models/entities/note.js';
import { Emojis } from '@/models/index.js';
import { IsNull } from 'typeorm';
import renderEmoji from './emoji.js';
export const renderLike = async (noteReaction: NoteReaction, note: Note) => {
@ -18,9 +19,9 @@ export const renderLike = async (noteReaction: NoteReaction, note: Note) => {
if (reaction.startsWith(':')) {
const name = reaction.replace(/:/g, '');
const emoji = await Emojis.findOne({
const emoji = await Emojis.findOneBy({
name,
host: null,
host: IsNull(),
});
if (emoji) object.tag = [ renderEmoji(emoji) ];