mirror of
https://github.com/paricafe/misskey.git
synced 2025-01-11 09:00:51 -06:00
2756f553c6
* wip
* wip
* wip
* Update attached_notes.ts
* wip
* Refactor
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update call.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* ✌️
* Fix
39 lines
638 B
TypeScript
39 lines
638 B
TypeScript
import $ from 'cafy';
|
|
import define from '../../../define';
|
|
import Instance from '../../../../../models/instance';
|
|
|
|
export const meta = {
|
|
requireCredential: true,
|
|
requireModerator: true,
|
|
|
|
params: {
|
|
host: {
|
|
validator: $.str
|
|
},
|
|
|
|
isBlocked: {
|
|
validator: $.bool
|
|
},
|
|
|
|
isClosed: {
|
|
validator: $.bool
|
|
},
|
|
}
|
|
};
|
|
|
|
export default define(meta, async (ps, me) => {
|
|
const instance = await Instance.findOne({ host: ps.host });
|
|
|
|
if (instance == null) {
|
|
throw new Error('instance not found');
|
|
}
|
|
|
|
Instance.update({ host: ps.host }, {
|
|
$set: {
|
|
isBlocked: ps.isBlocked,
|
|
isMarkedAsClosed: ps.isClosed
|
|
}
|
|
});
|
|
|
|
return;
|
|
});
|