-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert 'Clear Server Cache' button to just clear the middle-tier cach…
…e. (#2986)
- Loading branch information
1 parent
5163a9d
commit d85c48a
Showing
1 changed file
with
16 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
define(function (require, exports) { | ||
const config = require('appConfig'); | ||
const authApi = require('services/AuthAPI'); | ||
const httpService = require('services/http'); | ||
define(function(require, exports) { | ||
|
||
function clearCache() { | ||
return httpService | ||
.doPost(config.webAPIRoot + 'cdmresults/clearCache') | ||
.then((res) => res.data) | ||
.catch((error) => { | ||
console.log('Error: ' + error); | ||
authApi.handleAccessDenied(error); | ||
return Promise.reject(error); | ||
}); | ||
} | ||
const config = require('appConfig'); | ||
const authApi = require('services/AuthAPI'); | ||
const httpService = require('services/http'); | ||
|
||
return { | ||
clearCache, | ||
}; | ||
function clearCache() { | ||
return httpService.doGet(config.webAPIRoot + 'cache/clear') | ||
.then(res => res.data) | ||
.catch((error) => { | ||
console.log("Error: " + error); | ||
authApi.handleAccessDenied(error); | ||
}); | ||
} | ||
|
||
return { | ||
clearCache, | ||
}; | ||
}); |