iceshrimp-legacy/packages/backend/src/server/api/endpoints/admin/relays/remove.ts

22 lines
420 B
TypeScript
Raw Normal View History

import $ from 'cafy';
import define from '../../../define';
import { removeRelay } from '@/services/relay';
export const meta = {
tags: ['admin'],
requireCredential: true as const,
requireModerator: true as const,
params: {
inbox: {
2021-12-09 15:58:30 +01:00
validator: $.str,
},
},
};
2022-01-02 18:12:50 +01:00
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
return await removeRelay(ps.inbox);
});