-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(articles): Completes get a single article by slug
- Write tests
- Loading branch information
1 parent
5205b35
commit 4979b91
Showing
5 changed files
with
57 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { Router } from 'express'; | ||
import UserController from '../controllers/UserController'; | ||
import isLoggedIn from '../middlewares/isLoggedIn'; | ||
import ArticleController from '../controllers/ArticleController'; | ||
import ArticleValidator from '../middlewares/validations/ArticleValidator'; | ||
|
||
const userRouter = Router(); | ||
|
||
userRouter.get('/', isLoggedIn, UserController.getLoggedInUser); | ||
|
||
userRouter.get('/:username/articles', ArticleValidator.paginationValidation, ArticleController.getUserArticles); | ||
userRouter.get('/', isLoggedIn, UserController.getLoggedInUser); | ||
|
||
export default userRouter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters