Optional
onOptional method to perform teardown or clean-up actions specific to the instance. It is invoked when the instance is being destroyed. This method does not take any parameters and does not return any value.
Static
getRetrieves and parses the "id" parameter from the given request object.
The request object containing parameters.
Optional
shouldThrow: boolean = trueDetermines whether an exception should be thrown if the "id" parameter is missing.
The parsed integer value of the "id" parameter if present, or null if not present and shouldThrow
is false.
Static
getStatic
getTries to get parameters specified in paramDefinition from requests route parameters. If a parameter is not found in the request, the parameter is set to the default value specified in paramDefinition.
{Express.Request}
{ParamDefinition}
Abstract class representing a base controller with commonly used methods for handling requests and parameters. This class extends the ControllerInstance and provides utility methods for parameter retrieval and parsing.