2022-06-14 09:01:23 +00:00
|
|
|
import { createExportCustomEmojisJob } from '@/queue/index.js';
|
2022-07-13 22:01:23 +00:00
|
|
|
import { HOUR } from '@/const.js';
|
2022-08-03 11:18:33 +00:00
|
|
|
import define from '../define.js';
|
2021-12-10 09:24:26 +00:00
|
|
|
|
|
|
|
export const meta = {
|
|
|
|
secure: true,
|
2022-01-18 13:27:10 +00:00
|
|
|
requireCredential: true,
|
2021-12-10 09:24:26 +00:00
|
|
|
limit: {
|
2022-07-13 22:01:23 +00:00
|
|
|
duration: HOUR,
|
2021-12-10 09:24:26 +00:00
|
|
|
max: 1,
|
|
|
|
},
|
2022-01-18 13:27:10 +00:00
|
|
|
} as const;
|
2021-12-10 09:24:26 +00:00
|
|
|
|
2022-02-20 04:15:40 +00:00
|
|
|
export const paramDef = {
|
2022-02-19 05:05:32 +00:00
|
|
|
type: 'object',
|
2022-10-11 23:16:09 +00:00
|
|
|
properties: {
|
|
|
|
ids: {
|
|
|
|
description: 'Specific emoji IDs to be exported. Non-local emoji will be ignored. If not provided, all local emoji will be exported.',
|
|
|
|
type: 'array',
|
|
|
|
items: { type: 'string' },
|
|
|
|
minItems: 1,
|
|
|
|
uniqueItems: true,
|
|
|
|
},
|
|
|
|
},
|
2022-02-19 05:05:32 +00:00
|
|
|
required: [],
|
|
|
|
} as const;
|
|
|
|
|
2022-01-02 17:12:50 +00:00
|
|
|
// eslint-disable-next-line import/no-default-export
|
2022-02-19 05:05:32 +00:00
|
|
|
export default define(meta, paramDef, async (ps, user) => {
|
2022-10-11 23:16:09 +00:00
|
|
|
createExportCustomEmojisJob(user, ps.ids);
|
2021-12-10 09:24:26 +00:00
|
|
|
});
|