check DevChat key whether is valid
This commit is contained in:
parent
5bad8896f4
commit
1ac83d4d79
@ -87,6 +87,12 @@ function regAccessKeyCommand(context: vscode.ExtensionContext, provider: string)
|
|||||||
if (passwordInput === undefined) {
|
if (passwordInput === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (provider === "DevChat" && passwordInput.trim() !== "") {
|
||||||
|
if (!passwordInput.trim().startsWith("DC.")) {
|
||||||
|
UiUtilWrapper.showErrorMessage("Your key is invalid! DevChat Access Key is: DC.xxxxx");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (passwordInput.trim() !== "" && !isValidApiKey(passwordInput)) {
|
if (passwordInput.trim() !== "" && !isValidApiKey(passwordInput)) {
|
||||||
UiUtilWrapper.showErrorMessage("Your key is invalid!");
|
UiUtilWrapper.showErrorMessage("Your key is invalid!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user