mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +00:00
handle license errors
This commit is contained in:
@@ -2,8 +2,8 @@ DEVMODE=1
|
|||||||
SHELL_SCRIPTING=1
|
SHELL_SCRIPTING=1
|
||||||
ALLOW_DBGATE_PRIVATE_CLOUD=1
|
ALLOW_DBGATE_PRIVATE_CLOUD=1
|
||||||
DEVWEB=1
|
DEVWEB=1
|
||||||
PROD_DBGATE_CLOUD=1
|
# PROD_DBGATE_CLOUD=1
|
||||||
PROD_DBGATE_IDENTITY=1
|
# PROD_DBGATE_IDENTITY=1
|
||||||
# LOCAL_DBGATE_CLOUD=1
|
# LOCAL_DBGATE_CLOUD=1
|
||||||
# LOCAL_DBGATE_IDENTITY=1
|
# LOCAL_DBGATE_IDENTITY=1
|
||||||
|
|
||||||
|
|||||||
@@ -260,9 +260,13 @@ async function callCloudApiGet(endpoint, signinHolder = null, additionalHeaders
|
|||||||
},
|
},
|
||||||
validateStatus: status => status < 500,
|
validateStatus: status => status < 500,
|
||||||
});
|
});
|
||||||
const { errorMessage } = resp.data;
|
const { errorMessage, isLicenseLimit, limitedLicenseLimits } = resp.data;
|
||||||
if (errorMessage) {
|
if (errorMessage) {
|
||||||
return { apiErrorMessage: errorMessage };
|
return {
|
||||||
|
apiErrorMessage: errorMessage,
|
||||||
|
apiErrorIsLicenseLimit: isLicenseLimit,
|
||||||
|
apiErrorLimitedLicenseLimits: limitedLicenseLimits,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return resp.data;
|
return resp.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,9 +170,11 @@
|
|||||||
folid: folder,
|
folid: folder,
|
||||||
role,
|
role,
|
||||||
});
|
});
|
||||||
const inviteLink = `dbgate://folder/v1/${inviteToken}?mode=${role}`;
|
if (inviteToken) {
|
||||||
navigator.clipboard.writeText(inviteLink);
|
const inviteLink = `dbgate://folder/v1/${inviteToken}?mode=${role}`;
|
||||||
showSnackbarInfo(`Invite link (${role}) copied to clipboard`);
|
navigator.clipboard.writeText(inviteLink);
|
||||||
|
showSnackbarInfo(`Invite link (${role}) copied to clipboard`);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|||||||
Reference in New Issue
Block a user