mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 08:43:08 +02:00
52774bbe64
* wip * wip * wip * Update index.ts * Update gen-openapi-spec.ts * Update api.ja-JP.md * Fix * Improve doc * Update gen-openapi-spec.ts * Update redoc.html * Improve doc * Update gen-openapi-spec.ts * Improve doc * Update CHANGELOG.md
22 lines
371 B
TypeScript
22 lines
371 B
TypeScript
import $ from 'cafy';
|
|
import define from '../../define';
|
|
import Instance from '../../../../models/instance';
|
|
|
|
export const meta = {
|
|
tags: ['federation'],
|
|
|
|
requireCredential: false,
|
|
|
|
params: {
|
|
host: {
|
|
validator: $.str
|
|
}
|
|
}
|
|
};
|
|
|
|
export default define(meta, async (ps, me) => {
|
|
const instance = await Instance
|
|
.findOne({ host: ps.host });
|
|
|
|
return instance;
|
|
});
|