@beholdio/ts-lambda-api - v2.4.8
    Preparing search index...

    Class ControllerAbstract

    Base class for API controllers. Provides access to the current HTTP context as protected fields, and convenience method for applying JSON patches.

    Index

    Constructors

    Properties

    _logger: ILogger

    Logger instance for this controller.

    request: Request

    The current HTTP request context.

    response: Response

    The current HTTP response context.

    Methods

    • Apply a set of JSON patch operations to an object instance.

      Type Parameters

      • T

        The type of object to be patched.

      Parameters

      • patch: JsonPatch

        The operations to apply.

      • obj: T

        The object instance to apply operations to.

      Returns T

    • Parameters

      • request: Request

      Returns void

    • Parameters

      • response: Response

      Returns void