Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UserController

Create and restore users from memory

Hierarchy

  • UserController

Index

Methods

blank

  • blank(): User

byId

  • byId(id: string, options?: any): User
  • Get a user by ID from memory. If found and given options, updates and returns updated user. If given options and ID not found, creates new user.

    Parameters

    • id: string
    • Optional options: any

    Returns User

byName

  • byName(name: string): User[]
  • Get users by their name.

    Parameters

    • name: string

    Returns User[]

create

  • create(options?: IUser): User
  • Create a user, populated attributes from options.

    Parameters

    • Default value options: IUser = {}

    Returns User

random

  • random(): User

Generated using TypeDoc