mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 10:34:17 +00:00
18 lines
351 B
JavaScript
18 lines
351 B
JavaScript
import { HttpRequestHandler } from "../Handler"
|
|
|
|
export default class Endpoint {
|
|
static _constructed = false
|
|
static _class = true
|
|
|
|
constructor(method, context) {
|
|
this._constructed = true
|
|
this.context = context
|
|
|
|
if (typeof method === "function") {
|
|
this.run = method
|
|
}
|
|
|
|
this.handler = new HttpRequestHandler(this.run, this.context)
|
|
}
|
|
}
|