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:
		| @@ -1,7 +1,8 @@ | ||||
| import define from '../../../define.js'; | ||||
| import { Emojis } from '@/models/index.js'; | ||||
| import { getConnection, In } from 'typeorm'; | ||||
| import { In } from 'typeorm'; | ||||
| import { ApiError } from '../../../error.js'; | ||||
| import { db } from '@/db/postgre.js'; | ||||
|  | ||||
| export const meta = { | ||||
| 	tags: ['admin'], | ||||
| @@ -25,7 +26,7 @@ export const paramDef = { | ||||
|  | ||||
| // eslint-disable-next-line import/no-default-export | ||||
| export default define(meta, paramDef, async (ps) => { | ||||
| 	const emojis = await Emojis.find({ | ||||
| 	const emojis = await Emojis.findBy({ | ||||
| 		id: In(ps.ids), | ||||
| 	}); | ||||
|  | ||||
| @@ -36,5 +37,5 @@ export default define(meta, paramDef, async (ps) => { | ||||
| 		}); | ||||
| 	} | ||||
|  | ||||
| 	await getConnection().queryResultCache!.remove(['meta_emojis']); | ||||
| 	await db.queryResultCache!.remove(['meta_emojis']); | ||||
| }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo