mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: appwritekey error when required
This commit is contained in:
1 parent
f4bf3c5a8e
commit
dc4f6eb937
2 files changed
+5
-2
No files matched your search
@@ -14,7 +14,7 @@
|
||||
id={appwriteVariable.name}
|
||||
label={appwriteVariable.name}
|
||||
placeholder={appwriteVariable.placeholder ?? 'Enter value'}
|
||||
required={appwriteVariable.required}
|
||||
required={appwriteVariable.required && !$templateConfig.generateKey}
|
||||
bind:value={$templateConfig.appwriteApiKey}
|
||||
disabled={!!$templateConfig.generateKey} />
|
||||
<Helper type="neutral">
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
if (!variable.required) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (variable.name === 'APPWRITE_API_KEY') {
|
||||
if ($templateConfig.appwriteApiKey || $templateConfig.generateKey) continue;
|
||||
else throw new Error(`Please set ${variable.name} variable or generate it.`);
|
||||
}
|
||||
if (!$templateConfig.variables[variable.name]) {
|
||||
throw new Error(`Please set ${variable.name} variable.`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user