Files
misskey/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts
tamaina ce5faa8ff5 wip
2023-05-26 07:18:15 +00:00

17 lines
544 B
TypeScript

import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
// eslint-disable-next-line import/no-default-export
@Injectable()
export default class extends Endpoint<'admin/emoji/set-aliases-bulk'> {
name = 'admin/emoji/set-aliases-bulk' as const;
constructor(
private customEmojiService: CustomEmojiService,
) {
super(async (ps, me) => {
await this.customEmojiService.setAliasesBulk(ps.ids, ps.aliases);
});
}
}