2019-02-07 09:11:20 +00:00
|
|
|
import $ from 'cafy';
|
|
|
|
import define from '../../define';
|
|
|
|
import Instance from '../../../../models/instance';
|
|
|
|
|
|
|
|
export const meta = {
|
2019-02-23 02:20:58 +00:00
|
|
|
tags: ['federation'],
|
|
|
|
|
2019-02-07 09:11:20 +00:00
|
|
|
requireCredential: false,
|
|
|
|
|
|
|
|
params: {
|
|
|
|
host: {
|
|
|
|
validator: $.str
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-02-22 02:46:58 +00:00
|
|
|
export default define(meta, async (ps, me) => {
|
2019-02-07 09:11:20 +00:00
|
|
|
const instance = await Instance
|
|
|
|
.findOne({ host: ps.host });
|
|
|
|
|
2019-02-22 02:46:58 +00:00
|
|
|
return instance;
|
|
|
|
});
|