• Has allowed typeId validator

    Parameters

    • typeIdWhiteList: readonly string[]

      list of allowed typeIds

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

      • body.typeId is required

    Returns Promise<number>

    200 Status OK

    Description

    This validator will check if typeId is allowed by applying the following steps in sequence:

    1. Get typeId from context.body

    2. Check if typeId exist

    3. Check if typeId is in typeIdWhiteList

    Throws

    400 NBError Bad Request

    • typeId not exist in request body
    • typeId: ${typeId} is not supported

Generated using TypeDoc