How to use the inversify-express-utils.Put function in inversify-express-utils

To help you get started, we’ve selected a few inversify-express-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / inversify-express-utils / inversify-express-utils-tests.ts View on Github external
@Controller("/")
    class TestController {

        @Get("/")
        public testGet() { return "GET"; }

        @All("/")
        public testAll() { return "ALL"; }

        @Delete("/")
        public testDelete() { return "DELETE"; }

        @Head("/")
        public testHead() { return "HEAD"; }

        @Put("/")
        public testPut() { return "PUT"; }

        @Patch("/")
        public testPatch() { return "PATCH"; }

        @Post("/")
        public testPost() { return "POST"; }

        @Method("foo", "/")
        public testMethod() { return "METHOD:FOO"; }
    }

    kernel.bind(TYPE.Controller).to(TestController);

    function m1(req: express.Request, res: express.Response, next: express.NextFunction) { next(); }
    function m2(req: express.Request, res: express.Response, next: express.NextFunction) { next(); }
github DefinitelyTyped / DefinitelyTyped / inversify-express-utils / inversify-express-utils-tests.ts View on Github external
@Controller("/", m1, m2, m3)
    class TestMiddlewareController {

        @Get("/", m1, m2, m3)
        public testGet() { return "GET"; }

        @All("/", m1, m2, m3)
        public testAll() { return "ALL"; }

        @Delete("/", m1, m2, m3)
        public testDelete() { return "DELETE"; }

        @Head("/", m1, m2, m3)
        public testHead() { return "HEAD"; }

        @Put("/", m1, m2, m3)
        public testPut() { return "PUT"; }

        @Patch("/", m1, m2, m3)
        public testPatch() { return "PATCH"; }

        @Post("/", m1, m2, m3)
        public testPost() { return "POST"; }

        @Method("foo", "/", m1, m2, m3)
        public testMethod() { return "METHOD:FOO"; }
    }
}