mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-18 07:57:38 -07:00
30 lines
551 B
TypeScript
30 lines
551 B
TypeScript
import { pack } from '../../../models/user';
|
|
import define from '../define';
|
|
|
|
export const meta = {
|
|
stability: 'stable',
|
|
|
|
desc: {
|
|
'ja-JP': '自分のアカウント情報を取得します。'
|
|
},
|
|
|
|
requireCredential: true,
|
|
|
|
params: {},
|
|
|
|
res: {
|
|
type: 'entity',
|
|
entity: 'User'
|
|
}
|
|
};
|
|
|
|
export default define(meta, (ps, user, app) => new Promise(async (res, rej) => {
|
|
const isSecure = user != null && app == null;
|
|
|
|
// Serialize
|
|
res(await pack(user, user, {
|
|
detail: true,
|
|
includeHasUnreadNotes: true,
|
|
includeSecrets: isSecure
|
|
}));
|
|
}));
|