1234567891011121314151617181920212223242526 |
- //© 2019 Dublin City University, Trinity College Dublin. All rights reserved. This material may not be reproduced, displayed, modified or distributed without the express prior written permission of the copyright holder.
- import express from 'express';
- import StoreController from '../storeController/Store';
- import FileUploader from '../fileUploader/fileUpload';
- import KnowledgeBase from '../KnowledgeBase/knowledgeBase';
- const router = express.Router();
- router.get('/', function(req,res){
- res.sendFile(__dirname + '/index.html');
- });
- router.get('/api/v1/status', StoreController.getStatus);
- router.get('/api/v1/getAllDataset', StoreController.getAllDataset);
- router.get('/api/v1/getDataset', StoreController.getDataset);
- router.post('/api/v1/addDataset', StoreController.addDataset);
- router.get('/api/v1/removeDataset', StoreController.removeDataset);
- router.post('/api/v1/updateDataset', StoreController.updateDataset);
- router.post('/api/v1/upload', FileUploader.upload);
- router.post('/api/v1/knowledgeBase', KnowledgeBase.generateKnowledgeBase);
- router.get('/api/v1/knowledgeBase', KnowledgeBase.getKnowledgeBaseStatus);
- router.get('/api/v1/getKnowledgeBase', KnowledgeBase.getKnowledgeBase);
- router.get('/api/v1/getKnowledgeBaseDocumentsID', KnowledgeBase.findKnowledgeBaseDocumentIDs);
- router.get('/api/v1/getKnowledgeBaseStatus', KnowledgeBase.getKnowledgeBaseMongoDBStatus);
- export default router;
|