Skip to content

Commit 67db0f2

Browse files
committed
components: address[address_router]
1 parent 33c58be commit 67db0f2

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

components/address/address_router.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
import express from "express";
22
import { validate } from "../../middlewares/validate.js";
3-
import { allowedTo, protectedRoutes } from "../auth/auth.controller.js";
4-
import * as address from "../address/address.controller.js";
3+
import { allowedTo, protectedRoutes } from "../auth/auth_controller.js";
4+
import * as address from "../address/address_controller.js";
55
import {
66
addAddressValidation,
77
deleteAddressValidation,
8-
} from "./address.validation.js";
8+
} from "./address_validation.js";
99

1010
const addressRouter = express.Router();
1111

12-
addressRouter.route("/").patch(protectedRoutes, allowedTo("user"), validate(addAddressValidation), address.addAddress).delete(protectedRoutes,
13-
allowedTo("user"),
14-
validate(deleteAddressValidation),
15-
address.removeAddress
16-
)
17-
.get(protectedRoutes, allowedTo("user"), address.getAllAddresses);
12+
addressRouter.route("/").patch(protectedRoutes, allowedTo("user"), validate(addAddressValidation), address.addAddress).delete(protectedRoutes, allowedTo("user"), validate(deleteAddressValidation), address.removeAddress).get(protectedRoutes, allowedTo("user"), address.getAllAddresses);
1813

1914
export default addressRouter;

0 commit comments

Comments
 (0)