mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat: create template function
This commit is contained in:
1 parent
6ce293eed0
commit
73aa36514e
1 file changed
+8
-6
+8
-6
@@ -52,7 +52,7 @@
|
||||
let entrypoint = '';
|
||||
let selectedScopes: string[] = [];
|
||||
let execute = false;
|
||||
let variables: Partial<Models.Variable>[] = [];
|
||||
let variables: Partial<Models.TemplateVariable>[] = [];
|
||||
|
||||
onMount(async () => {
|
||||
if (!$installation?.$id) {
|
||||
@@ -108,12 +108,12 @@
|
||||
id,
|
||||
name,
|
||||
runtime as Runtime,
|
||||
undefined, //excute ? permissions || undefined : undefined,
|
||||
data.template.permissions?.length ? data.template.permissions : undefined,
|
||||
data.template.events?.length ? data.template.events : undefined,
|
||||
data.template.cron || undefined,
|
||||
data.template.timeout ? data.template.timeout : undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
true,
|
||||
undefined,
|
||||
entrypoint,
|
||||
undefined,
|
||||
selectedScopes?.length ? selectedScopes : undefined,
|
||||
@@ -131,11 +131,13 @@
|
||||
func.$id
|
||||
);
|
||||
|
||||
console.log(variables);
|
||||
|
||||
// Add variables
|
||||
const promises = variables.map((variable) =>
|
||||
sdk.forProject.functions.createVariable(
|
||||
func.$id,
|
||||
variable.key,
|
||||
variable.name,
|
||||
variable.value,
|
||||
variable?.secret ?? false
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user