forked from FoundKeyGang/FoundKey
improve docs
This commit is contained in:
parent
a750c7ad57
commit
ee2860e894
2 changed files with 5 additions and 1 deletions
|
@ -87,11 +87,13 @@ export const packedUserDetailedNotMeOnlySchema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
url: {
|
url: {
|
||||||
|
description: 'URL to a presentation form intended for humans, if available',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'url',
|
format: 'url',
|
||||||
nullable: true, optional: false,
|
nullable: true, optional: false,
|
||||||
},
|
},
|
||||||
uri: {
|
uri: {
|
||||||
|
description: 'ActivityPub `id` of this User',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'uri',
|
format: 'uri',
|
||||||
nullable: true, optional: false,
|
nullable: true, optional: false,
|
||||||
|
|
|
@ -6,6 +6,8 @@ export const meta = {
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
|
|
||||||
|
description: 'Show the representation of the authenticated user.',
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
|
@ -23,7 +25,7 @@ export const paramDef = {
|
||||||
export default define(meta, paramDef, async (ps, user, token) => {
|
export default define(meta, paramDef, async (ps, user, token) => {
|
||||||
const isSecure = token == null;
|
const isSecure = token == null;
|
||||||
|
|
||||||
// ここで渡ってきている user はキャッシュされていて古い可能性もあるので id だけ渡す
|
// The user passed here may be cached and out of date, so only the id is passed.
|
||||||
return await Users.pack<true, true>(user.id, user, {
|
return await Users.pack<true, true>(user.id, user, {
|
||||||
detail: true,
|
detail: true,
|
||||||
includeSecrets: isSecure,
|
includeSecrets: isSecure,
|
||||||
|
|
Loading…
Reference in a new issue