/[sudobot]/trunk/src/api/Controller.ts
ViewVC logotype

Diff of /trunk/src/api/Controller.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 325 by rakin, Mon Jul 29 17:29:32 2024 UTC revision 348 by rakin, Mon Jul 29 17:29:43 2024 UTC
# Line 2  import KeyValuePair from "../types/KeyVa Line 2  import KeyValuePair from "../types/KeyVa
2  import Response from "./Response";  import Response from "./Response";
3    
4  export default class Controller {  export default class Controller {
5        constructor() {
6            console.log("Constructor call");
7        }
8    
9      protected response(body: string, status: number = 200, headers: KeyValuePair<string> = {}) {      protected response(body: string, status: number = 200, headers: KeyValuePair<string> = {}) {
10          return new Response(status, body, headers);          return new Response(status, body, headers);
11      }      }
12    
13        globalMiddleware(): Function[] {
14            return [];
15        }
16    
17        middleware(): KeyValuePair<Function[]> {
18            return {};
19        }
20  }  }

Legend:
Removed from v.325  
changed lines
  Added in v.348

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26