Skip to content

Instantly share code, notes, and snippets.

@kauemurakami
Created June 1, 2020 18:05
Show Gist options
  • Save kauemurakami/c21c617d4fd576f5be07bb993a2d4094 to your computer and use it in GitHub Desktop.
Save kauemurakami/c21c617d4fd576f5be07bb993a2d4094 to your computer and use it in GitHub Desktop.
arquivo de rotas
import { Router } from "https://deno.land/x/attain/mod.ts";
import { getUsers, getUser, updateUser, addUser, deleteUser } from "../controllers/client_controller.ts"
const clientsRouter = new Router()
clientsRouter.get("/", getUsers )
clientsRouter.get("/:id", getUser)
clientsRouter.put("/:id", updateUser);
clientsRouter.delete("/:id", deleteUser);
clientsRouter.post("/", addUser)
export default clientsRouter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment