Skip to content

Commit

Permalink
use generic endpointType for dynamic datasets issue #57
Browse files Browse the repository at this point in the history
  • Loading branch information
ali1k committed Oct 2, 2018
1 parent 989e18d commit 64a3d70
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions services/resource.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
import {sparqlEndpoint} from '../configs/server';
import {getHTTPQuery, getHTTPGetURL, prepareDG} from './utils/helpers';
import {checkViewAccess, checkEditAccess} from './utils/accessManagement';
import {getDynamicEndpointParameters, createASampleReactorConfig, createASampleFacetsConfig, createASampleServerConfig, createAnEnvState, getSavedQueries} from './utils/dynamicHelpers';
Expand Down Expand Up @@ -417,6 +418,10 @@ export default {
});
}else if (resource === 'resource.newServerConfig') {
datasetURI = params.dataset;
// use generic endpointType for new datasets
if(sparqlEndpoint['generic'] && sparqlEndpoint['generic'].endpointType){
params.options.endpointType = sparqlEndpoint['generic'].endpointType;
}
createASampleServerConfig(req.user, datasetURI, params.options, (res)=>{
callback(null, {datasetURI: datasetURI, redirect: params.redirect});
});
Expand Down

0 comments on commit 64a3d70

Please sign in to comment.