Skip to content

Instantly share code, notes, and snippets.

@tsh-code
Created October 18, 2021 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsh-code/b9b9f3d126b659b2b41ae3ba3218d587 to your computer and use it in GitHub Desktop.
Save tsh-code/b9b9f3d126b659b2b41ae3ba3218d587 to your computer and use it in GitHub Desktop.
import * as express from "express";
import { Action } from "../../../shared/http/types";
import { createUserActionValidation } from "./actions/create-users.action";
export interface UsersRoutingDependencies {
createUserAction: Action;
}
export const usersRouting = (actions: UsersRoutingDependencies) => {
const router = express.Router();
router.post("/create", [createUserActionValidation], actions.createUserAction.invoke.bind(actions.createUserAction));
return router;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment