Update Emojis immediately (#5106)

This commit is contained in:
Satsuki Yanagi
2019-07-05 07:45:00 +09:00
committed by syuilo
parent a8f945ae8e
commit d5caf22d8c
4 changed files with 10 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ import $ from 'cafy';
import define from '../../../define';
import { ID } from '../../../../../misc/cafy-id';
import { Emojis } from '../../../../../models';
import { getConnection } from 'typeorm';
export const meta = {
desc: {
@@ -26,4 +27,6 @@ export default define(meta, async (ps) => {
if (emoji == null) throw new Error('emoji not found');
await Emojis.delete(emoji.id);
await getConnection().queryResultCache!.remove(['meta_emojis']);
});