NodeJS
I have simple server action:
As shown in the graphical representation in Security Login, the variables user, password, and remember have been assigned values. However, this is not reflected in the login_copy.json file, and Wappler (as shown at the bottom of the image) returns an error.
In the login_copy.json file, this corresponds to the following text:
{
"name": "identity",
"module": "auth",
"action": "login",
"options": {
"provider": "commweb",
"username": "{{email}}"
},
"output": true,
"meta": []
}
The JSON file only contains data for the username. So why do we see values assigned to “password” and “remember” in the graphical interface?
That said, everything works correctly; I can log in to the site using this API.
Full json:
{
"meta": {
"options": {
"linkedFile": "/views/login.ejs",
"linkedForm": "login1"
},
"$_POST": [
{
"type": "text",
"fieldName": "email",
"options": {
"rules": {
"core:required": {
"param": ""
},
"core:email": {
"param": ""
}
}
},
"name": "email"
},
{
"type": "text",
"fieldName": "password",
"options": {
"rules": {
"core:required": {
"param": ""
}
}
},
"name": "password"
},
{
"type": "text",
"fieldName": "remember",
"name": "remember"
}
]
},
"exec": {
"steps": [
{
"name": "email",
"module": "core",
"action": "setvalue",
"options": {
"value": "{{$_POST.email.lowercase()}}"
},
"meta": [],
"outputType": "text"
},
{
"name": "identity",
"module": "auth",
"action": "login",
"options": {
"provider": "commweb",
"username": "{{email}}"
},
"output": true,
"meta": []
},
{
"name": "identity",
"module": "auth",
"action": "identify",
"options": {
"provider": "commweb"
},
"meta": []
}
]
}
}
In reality, I ran into a problem where a significant portion of the API files weren't being uploaded to the server (about 1/3). I started digging into it and saw the “Problems” button; then I discovered that Wappler had a lot of issues with my project, so I began looking into what exactly was wrong. I’m sure some of it has to do with the fact that an AI wrote the API for me. Somewhere, it set `type=‘json’`, but Wappler requires `“object”`. However, everything works fine—there are no issues with the API’s execution.
It’s very important to understand how Wappler works:
1. Where does Wappler get information about the server action? How is it that I see one thing in the JSON file but something else in the graphical interface?
2. How does Wappler decide which files to send to the server and which not to?






