You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
431 B
17 lines
431 B
3 years ago
|
import {AppClass} from "../../lifecycle/AppClass"
|
||
|
import {Request} from "../lifecycle/Request"
|
||
|
import {ResponseObject} from "./Route"
|
||
|
|
||
|
export abstract class Middleware extends AppClass {
|
||
|
constructor(
|
||
|
protected readonly request: Request
|
||
|
) { super() }
|
||
|
|
||
|
protected container() {
|
||
|
return this.request
|
||
|
}
|
||
|
|
||
|
// Return void | Promise<void> to continue request
|
||
|
public abstract apply(): ResponseObject
|
||
|
}
|