User User Profile

'/users/{id}/user-profile'

GET

async get(
    @param.path.string('id') id: string,
    @param.query.object('filter') filter?: Filter<UserProfile>,
  ): Promise<UserProfile>

Auth: No

Get the associated user profile for a user.

POST

async create(
    @param.path.string('id') id: typeof User.prototype.id,
    @requestBody({
      content: {
        'application/json': {
          schema: getModelSchemaRef(UserProfile, {
            title: 'NewUserProfileInUser',
            exclude: ['id'],
            optional: ['userId']
          }),
        },
      },
    }) userProfile: Omit<UserProfile, 'id'>,
  ): Promise<UserProfile>

Auth: Yes RBAC: Admin, User (owner)

Create an associated user profile for a user.

PATCH

async patch(
    @param.path.string('id') id: string,
    @requestBody({
      content: {
        'application/json': {
          schema: getModelSchemaRef(UserProfile, {partial: true}),
        },
      },
    })
    userProfile: Partial<UserProfile>,
    @param.query.object('where', getWhereSchemaFor(UserProfile)) where?: Where<UserProfile>,
  ): Promise<Count>

Auth: Yes RBAC: Admin, User (owner)

Edit an associated user profile for a user.

DEL

async delete(
    @param.path.string('id') id: string,
    @param.query.object('where', getWhereSchemaFor(UserProfile)) where?: Where<UserProfile>,
  ): Promise<Count>

Auth: Yes RBAC: Admin, User (owner)

Delete an associated user profile for a user.

Last updated