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