• Get user by id handler

    Parameters

    • userService: UserDataService

      injected service use to handle the user related operations

      • getUserById
    • customFieldDefinitions: CustomField[]

      injected custom field definitions

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query]. Note:

      • params.id is required

    Returns Promise<adapter.AdapterHandlerResponse>

    200 Status OK

    • data: user

    Description

    This handler will get user by id by applying the following steps in sequence:

    1. Get userId from context.params

    2. Get user by id (userService.getUserById)

    3. Normalize user response (normalizeUserResponse)

    4. Return user

    Throws

    Error

    • userId not defined

    Throws

    404 NBError Not Found

    • user not found

    Throws

    500 NBError Internal Server Error

    • normalizeUser error

Generated using TypeDoc