/[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 348 by rakin, Mon Jul 29 17:29:43 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";  import KeyValuePair from "../types/KeyValuePair";
3  import Response from "./Response";  import Response from "./Response";
4    
5  export default class Controller {  export default class Controller {
6      constructor() {      constructor(protected client: DiscordClient) {
7          console.log("Constructor call");          console.log("Constructor call");
8      }      }
9    
10      protected response(body: string, status: number = 200, headers: KeyValuePair<string> = {}) {      protected response(body: string | object | null | undefined, status: number = 200, headers: KeyValuePair<string> = {}) {
11          return new Response(status, body, headers);          return new Response(status, body, headers);
12      }      }
13    

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26