Skip to content
Snippets Groups Projects
Commit ef0f7198 authored by alrwasheda's avatar alrwasheda :speech_balloon:
Browse files

showAnAccount Route: using id (email)

parent b4cf8785
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import validateToken from "../middleware/validateToken";
const accountsRouter = Router();
//create new account
accountsRouter.post(
"/api/accounts/",
body("first_name").not().isEmpty(),
......@@ -17,10 +18,16 @@ accountsRouter.post(
validateToken,
accountsControllers.createAccountController
);
//show all accounts
accountsRouter.get(
"/api/accounts/",
validateToken,
accountsControllers.showAllAccounts
);
//show specific account by id (email)
accountsRouter.get(
"/api/accounts/:id/",
validateToken,
accountsControllers.showAccountById
)
export default accountsRouter;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment