enhance(backend): admin/emoji/addで作成した絵文字を返すように

This commit is contained in:
syuilo 2023-07-20 17:40:04 +09:00
parent 8e11a30c36
commit 7d6ea74288

View file

@ -4,6 +4,7 @@ import type { DriveFilesRepository } from '@/models/index.js';
import { DI } from '@/di-symbols.js';
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
import { ModerationLogService } from '@/core/ModerationLogService.js';
import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
import { ApiError } from '../../../error.js';
export const meta = {
@ -55,6 +56,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
private customEmojiService: CustomEmojiService,
private emojiEntityService: EmojiEntityService,
private moderationLogService: ModerationLogService,
) {
super(meta, paramDef, async (ps, me) => {
@ -77,9 +79,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
emojiId: emoji.id,
});
return {
id: emoji.id,
};
return this.emojiEntityService.packDetailed(emoji);
});
}
}