Skip to content

Commit 0e05a33

Browse files
committed
created separate routes for different controllers
1 parent fb138dc commit 0e05a33

File tree

9 files changed

+5
-8
lines changed

9 files changed

+5
-8
lines changed

auth-route.ts

Whitespace-only changes.

node_modules/jest-runner/build/testWorker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/jest/bin/jest.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

product-route.ts

Whitespace-only changes.

src/db/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export const connectToDb = async () => {
1212

1313
return;
1414
}
15-
console.log(
16-
'🚀 ~ file: index.ts:17 ~ connectToDb ~ DB_URL:',
17-
process.env.DB_URL
18-
);
15+
1916
await mongoose.connect(DB_URL!, {
2017
dbName: 'rest-api',
2118
useNewUrlParser: true,

src/routes/auth-route.ts

Whitespace-only changes.

src/routes/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ import { admin, auth } from '../middlewares';
1313

1414
const router = express.Router();
1515

16-
//user
16+
//Authentication routes
1717

1818
router.post('/register', registerController.registerUser);
1919

2020
router.post('/login', loginController.loginUser);
2121

2222
router.post('/refresh', refreshTokenController.refresh);
2323

24-
//auth
24+
//user routes
2525

2626
router.get('/me', [auth], userController.me);
2727

src/routes/product-route.ts

Whitespace-only changes.

src/routes/user-route.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)