Forge Docs
UserProfile

Profile

ユーザーの公開プロフィールを管理する Sub-Feature

概要

User.Profile はユーザーの公開プロフィールの作成・取得・更新を担当する。サブフィーチャーとして Private(非公開プロフィール)を持つ。

API

Handler

関数説明
findProfileByUserId(client, userId)ユーザー ID からプロフィールを取得
updateProfile(client, userId, input)プロフィールを更新

Service

関数説明
createProfile(client, input)プロフィールを作成
findProfileByUserId(client, userId)プロフィールを取得
updateProfile(client, userId, input)プロフィールを更新

Schema

スキーマ説明
ProfileSchemaProfileプロフィール
CreateProfileInputSchemaCreateProfileInput作成入力
UpdateProfileInputSchemaUpdateProfileInput更新入力

サブフィーチャー

  • Private — 非公開プロフィール管理

使用例

import { User } from "@unitto/features";

const profile = await User.Profile.Handler.findProfileByUserId(client, userId);

await User.Profile.Handler.updateProfile(client, userId, {
  displayName: "新しい表示名",
});

On this page