improve docs
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
Johann150 2023-03-03 23:36:15 +01:00
parent a750c7ad57
commit ee2860e894
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 5 additions and 1 deletions

View file

@ -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,

View file

@ -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,