Skip to content

Commit

Permalink
Fixes #29 addLibrary and updateLibrary from seed possible (#31)
Browse files Browse the repository at this point in the history
* WIP add option to import library from seed

* WIP add from seed to library update and refactor
(WorkerRequests had way to much duplicated code)

* WIP Add tests for new feature and improve error handling
  • Loading branch information
Patrik Meijer authored and kecso committed Dec 13, 2017
1 parent dee2128 commit e0424e4
Show file tree
Hide file tree
Showing 4 changed files with 374 additions and 440 deletions.
13 changes: 8 additions & 5 deletions src/server/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2212,13 +2212,16 @@ function createAPI(app, mountPath, middlewareOpts) {
//router.get('/addOns/:addOnId/queryParamsStructure', ensureAuthenticated, function (req, res) {});
//router.post('/addOns/:addOnId/query', ensureAuthenticated, function (req, res) {});

router.get('/seeds', ensureAuthenticated, function (req, res) {
var seedDictionary = webgmeUtils.getSeedDictionary(gmeConfig);

logger.debug('/seeds', {metadata: seedDictionary});
res.send(Object.keys(seedDictionary));
router.get('/seeds', ensureAuthenticated, function (req, res, next) {
webgmeUtils.getSeedDictionary(gmeConfig)
.then(function (seedDictionary) {
logger.debug('/seeds', {metadata: seedDictionary});
res.send(Object.keys(seedDictionary));
})
.catch(next);
});

// FIXME: This should be async
function getVisualizersDescriptor() {
//we merge the contents of the CONFIG.visualizerDescriptors by id
var indexById = function (objectArray, id) {
Expand Down
Loading

0 comments on commit e0424e4

Please sign in to comment.