From 415e1cb5ee32094b4cadde7ee52a02521d2ee8b0 Mon Sep 17 00:00:00 2001 From: rpm-mcarman <65228808+rpm-mcarman@users.noreply.github.com> Date: Mon, 18 Mar 2024 20:09:30 -0400 Subject: [PATCH] Cleared Database --- .../Development/app/config/config.json | 2 +- app/api/security/defalutadminapi.json | 174 +++++++++++++++++- app/config/config.json | 2 +- data/authdb.sqlite3 | Bin 28672 -> 28672 bytes views/wadmin/usermanage.ejs | 2 +- 5 files changed, 175 insertions(+), 5 deletions(-) diff --git a/.wappler/targets/Development/app/config/config.json b/.wappler/targets/Development/app/config/config.json index 00bfe1c..48d79c6 100644 --- a/.wappler/targets/Development/app/config/config.json +++ b/.wappler/targets/Development/app/config/config.json @@ -6,6 +6,6 @@ "methods": "GET,POST,DELETE,PATCH,PUT" }, "env": { - "API_BASEURL": "http://vapor.prelub.com/api/v1.0/" + "API_BASEURL": "http://localhost:8080/api/v1.0/" } } \ No newline at end of file diff --git a/app/api/security/defalutadminapi.json b/app/api/security/defalutadminapi.json index ccfdb35..2ba1842 100644 --- a/app/api/security/defalutadminapi.json +++ b/app/api/security/defalutadminapi.json @@ -117,6 +117,172 @@ "if": "{{gettheuser}}", "then": { "steps": [ + { + "name": "api", + "module": "api", + "action": "send", + "options": { + "url": "{{$_ENV.API_BASEURL+'users/'+gettheuser.id}}", + "schema": [ + { + "type": "object", + "name": "data", + "sub": [ + { + "type": "number", + "name": "id" + }, + { + "type": "text", + "name": "lastname" + }, + { + "type": "text", + "name": "updatedate" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "boolean", + "name": "isactive" + }, + { + "type": "text", + "name": "password" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "text", + "name": "username" + }, + { + "type": "text", + "name": "email" + }, + { + "type": "text", + "name": "firstname" + }, + { + "type": "number", + "name": "createuserid" + }, + { + "type": "array", + "name": "roles" + } + ] + }, + { + "type": "object", + "name": "headers", + "sub": [ + { + "type": "text", + "name": "connection" + }, + { + "type": "text", + "name": "content-length" + }, + { + "type": "text", + "name": "content-type" + }, + { + "type": "text", + "name": "date" + } + ] + } + ] + }, + "output": true, + "meta": [ + { + "type": "object", + "name": "data", + "sub": [ + { + "type": "number", + "name": "id" + }, + { + "type": "text", + "name": "lastname" + }, + { + "type": "text", + "name": "updatedate" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "boolean", + "name": "isactive" + }, + { + "type": "text", + "name": "password" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "text", + "name": "username" + }, + { + "type": "text", + "name": "email" + }, + { + "type": "text", + "name": "firstname" + }, + { + "type": "number", + "name": "createuserid" + }, + { + "type": "array", + "name": "roles" + } + ] + }, + { + "type": "object", + "name": "headers", + "sub": [ + { + "type": "text", + "name": "connection" + }, + { + "type": "text", + "name": "content-length" + }, + { + "type": "text", + "name": "content-type" + }, + { + "type": "text", + "name": "date" + } + ] + } + ], + "outputType": "object" + }, { "name": "insertuser", "module": "api", @@ -263,7 +429,7 @@ "operator": "equal", "type": "expression", "name": ":P1", - "value": "{{$_GET.id}}", + "value": "{{insertuser.data.id}}", "test": "" } ], @@ -280,7 +446,7 @@ "field": "xuserrole.userid", "type": "double", "operator": "equal", - "value": "{{$_GET.id}}", + "value": "{{insertuser.data.id}}", "data": { "table": "xuserrole", "column": "userid", @@ -354,6 +520,10 @@ { "name": "roleid", "type": "number" + }, + { + "name": "addrole", + "type": "text" } ], "outputType": "array" diff --git a/app/config/config.json b/app/config/config.json index 00bfe1c..48d79c6 100644 --- a/app/config/config.json +++ b/app/config/config.json @@ -6,6 +6,6 @@ "methods": "GET,POST,DELETE,PATCH,PUT" }, "env": { - "API_BASEURL": "http://vapor.prelub.com/api/v1.0/" + "API_BASEURL": "http://localhost:8080/api/v1.0/" } } \ No newline at end of file diff --git a/data/authdb.sqlite3 b/data/authdb.sqlite3 index 9cf4aaab7a4e8c213c4b12b92149ca98c80f5fb7..105eead3ec84333646657ada65f2d1909f6d1e74 100644 GIT binary patch delta 192 zcmZp8z}WDBae_1>*F+g-RxSp;w3i!G0`nHpqYVbc|dqZaHNre qk%_K>v96(|f`NgRfw`5j$>y*A`~u8Ct2eVJeBx&ZTE@=EsRaPwMKaj{ delta 192 zcmZp8z}WDBae_1>%S0JxRu%@mqD3210` - +