First full release
This commit is contained in:
@@ -17,19 +17,22 @@ const {
|
||||
sendToReview,
|
||||
publish,
|
||||
updateQuestion,
|
||||
updateSharedAuthors
|
||||
updateSharedAuthors,
|
||||
sendPaginationData
|
||||
} = require('../../../controllers/api/v1/consultancy')
|
||||
|
||||
router.get('/entry-pagination', sendPaginationData)
|
||||
|
||||
router.get('/entry', listEntries)
|
||||
|
||||
router.get('/new-entry', listNewEntries)
|
||||
|
||||
// All routes require an authenticated user.
|
||||
router.use((req, res, next) => {
|
||||
if (req.isAuthenticated()) return next()
|
||||
res.status(400).send('Unauthenticated')
|
||||
})
|
||||
|
||||
router.get('/entry', listEntries)
|
||||
|
||||
router.get('/new-entry', listNewEntries)
|
||||
|
||||
router.post('/entry', createQuestion)
|
||||
|
||||
router.put('/entry', updateQuestion)
|
||||
|
||||
@@ -20,6 +20,18 @@ router.get('/:dictionaryId/listDomainLabels', dictionaries.listDomainLabels)
|
||||
// Change page in pagination
|
||||
router.get('/listSecondaryDomains', dictionaries.listSecondaryDomains)
|
||||
|
||||
// Change page in pagination
|
||||
router.get(
|
||||
'/:dictionaryId/showImportFromFileForm',
|
||||
dictionaries.showImportFromFileForm
|
||||
)
|
||||
|
||||
// Change page in pagination
|
||||
router.get(
|
||||
'/:dictionaryId/showExportToFileForm',
|
||||
dictionaries.showExportToFileForm
|
||||
)
|
||||
|
||||
// Delete all entries of specific dictionary.
|
||||
router.delete('/:dictionaryId/entries/all', dictionaries.deleteAllEntries)
|
||||
|
||||
@@ -28,8 +40,15 @@ router.put('/:dictionaryId/entries/all/publish', dictionaries.publishAllEntries)
|
||||
|
||||
// Import term candidates from extraction.
|
||||
router.post(
|
||||
'/:id/import/extraction/:extractionId',
|
||||
dictionaries.extractionImport
|
||||
'/:id/import-extraction/:extractionId',
|
||||
dictionaries.importFromExtraction
|
||||
)
|
||||
|
||||
// Export dictionary into a file.
|
||||
router.post('/:id/export-begin', dictionaries.exportBegin)
|
||||
|
||||
router.get('/:dictionaryId/domainLabels', dictionaries.listFilteredDomainLabels)
|
||||
|
||||
router.get('/secondaryDomains', dictionaries.listSecondaryDomainData)
|
||||
|
||||
module.exports = router
|
||||
|
||||
Reference in New Issue
Block a user