Add a commentaryRepository with function of:
- getting one commentary (by id)
- getting the list of commentaries (by news theme),
- getting the list of commentaries (publishedBy user)
Repository should be of exported function set like it is implemented in newsRepository or translationRepository - look at them. Be sure you have added a jsdoc description of input params and output return. Please comment your code for its better understanding.
commentaryRepository should use newsModel for getting access to list of commentaries. Add new methods in newsModel if you need. You can find the scheme of news and commentary in newsScheme and commentaryScheme in this folder.
Follow ESLint code style for better understanding.
Write questions about it during the work if there are some unclear points.
Add a commentaryRepository with function of:
Repository should be of exported function set like it is implemented in newsRepository or translationRepository - look at them. Be sure you have added a jsdoc description of input params and output return. Please comment your code for its better understanding.
commentaryRepository should use newsModel for getting access to list of commentaries. Add new methods in newsModel if you need. You can find the scheme of news and commentary in newsScheme and commentaryScheme in this folder.
Follow ESLint code style for better understanding.
Write questions about it during the work if there are some unclear points.