feat(mation): add specific remotes for license, telemetry and notifications
This commit is contained in:
@@ -4,6 +4,12 @@ import axios from './axios-with-proxy.js';
|
||||
|
||||
const CACHE_DURATION = 1000 * 60 * 60 * 24; // 24 hours in milliseconds
|
||||
|
||||
const AUTOMATISCH_LICENSE_VERIFY_URL =
|
||||
'https://license.automatisch.io/api/v1/licenses/verify';
|
||||
|
||||
const MATION_LICENSE_VERIFY_URL =
|
||||
'https://license.mation.work/api/v1/licenses/verify';
|
||||
|
||||
const hasValidLicense = async () => {
|
||||
const license = await getLicense();
|
||||
|
||||
@@ -17,7 +23,10 @@ const getLicense = async () => {
|
||||
return false;
|
||||
}
|
||||
|
||||
const url = 'https://license.automatisch.io/api/v1/licenses/verify';
|
||||
const url = appConfig.isMation
|
||||
? MATION_LICENSE_VERIFY_URL
|
||||
: AUTOMATISCH_LICENSE_VERIFY_URL;
|
||||
|
||||
const cachedResponse = memoryCache.get(url);
|
||||
|
||||
if (cachedResponse) {
|
||||
|
||||
Reference in New Issue
Block a user