monkeeShark/src/server/api/endpoints/i.ts
2020-03-28 11:24:37 +09:00

28 lines
540 B
TypeScript

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