1
0
forked from mirror/misskey
misskey/src/server/api/endpoints/i.ts
syuilo 52774bbe64
Introduce OpenAPI specs (#4351)
* 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
2019-02-23 11:20:58 +09:00

32 lines
533 B
TypeScript

import { pack } from '../../../models/user';
import define from '../define';
export const meta = {
stability: 'stable',
desc: {
'ja-JP': '自分のアカウント情報を取得します。'
},
tags: ['account'],
requireCredential: true,
params: {},
res: {
type: 'entity',
entity: 'User'
}
};
export default define(meta, async (ps, user, app) => {
const isSecure = user != null && app == null;
return await pack(user, user, {
detail: true,
includeHasUnreadNotes: true,
includeSecrets: isSecure
});
});