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

Legend:
Removed from v.323  
changed lines
  Added in v.349

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26