1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const Server_1 = require("../Server");
|
4 | class Route {
|
5 | static method(method, route, controller, action) {
|
6 | return { method, route, controller, action };
|
7 | }
|
8 | static get(route, controller, action) {
|
9 | return Route.method(Server_1.RequestMethods.Get, route, controller, action);
|
10 | }
|
11 | static post(route, controller, action) {
|
12 | return Route.method(Server_1.RequestMethods.Post, route, controller, action);
|
13 | }
|
14 | static put(route, controller, action) {
|
15 | return Route.method(Server_1.RequestMethods.Put, route, controller, action);
|
16 | }
|
17 | static patch(route, controller, action) {
|
18 | return Route.method(Server_1.RequestMethods.Patch, route, controller, action);
|
19 | }
|
20 | static delete(route, controller, action) {
|
21 | return Route.method(Server_1.RequestMethods.Delete, route, controller, action);
|
22 | }
|
23 | }
|
24 | exports.Route = Route;
|
25 |
|
\ | No newline at end of file |