diff options
author | 0neGal <mail@0negal.com> | 2023-09-16 18:17:04 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-09-16 18:17:04 +0200 |
commit | f3e5e1596a22c3df38a8c00a5ceadf8a5dd2967a (patch) | |
tree | a5ae56bdc7baedc22930697de9cefc171705410d /src/modules/requests.js | |
parent | 53c19052738a4a9cc43feca31e8231c844b4d2b5 (diff) | |
download | Viper-f3e5e1596a22c3df38a8c00a5ceadf8a5dd2967a.tar.gz Viper-f3e5e1596a22c3df38a8c00a5ceadf8a5dd2967a.zip |
added buttons for fixing some problems and alike
I will likely add more buttons in the future, but for now this is most
of the ones a user could need to repair problems.
Diffstat (limited to 'src/modules/requests.js')
-rw-r--r-- | src/modules/requests.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/requests.js b/src/modules/requests.js index 94639fa..a67bc26 100644 --- a/src/modules/requests.js +++ b/src/modules/requests.js @@ -27,6 +27,12 @@ function _getRequestsCache() { } } +function delete_cache() { + if (fs.existsSync(cachePath)) { + return fs.rmSync(cachePath); + } +} + // Returns latest Northstar version available from GitHub releases. If // there's no cache result for this request, or if cache exists but is // old, refreshes cache with new data. @@ -182,6 +188,7 @@ async function getVpReleaseNotes() { } module.exports = { + delete_cache, getLatestNsVersion, getLatestNsVersionLink, getNsReleaseNotes, |