Vincent Fournier e6cbd2e844 Rename config.json => defaultLayoutConfig.json
Change-Id: I6365ab3e0da0c98a0be6a8f12420973e9896297f
2015-07-30 16:02:21 -04:00

27 lines
798 B
JavaScript

angular.module('bansho.surveil', [])
.service('surveilConfig', function () {
var apiUrl,
authUrl,
surveilEndpoints = {};
return {
setSurveilApiUrl: function (surveilApiUrl) {
apiUrl = surveilApiUrl;
surveilEndpoints = {
status: apiUrl + '/status',
actions: apiUrl + '/actions',
appConfig: apiUrl + '/bansho/config'
};
},
setAuthUrl: function (url) {
authUrl = url;
},
endpoint: function (endpoint) {
return surveilEndpoints[endpoint];
},
getAuthUrl: function () {
return authUrl;
}
};
});