feat(mation): add specific remotes for license, telemetry and notifications

This commit is contained in:
Ali BARIN
2025-05-09 09:24:47 +00:00
parent 6532509dff
commit 804faeb5ec
3 changed files with 24 additions and 3 deletions

View File

@@ -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) {