Posts by Guillerbr • 59 points
16 posts
-
0
votes1
answer58
viewsA: Compare if the value of a variable is the same as the value already saved in the database
RESOLVED async resetPassword({ request, response }) { const { email, token, password } = request.body; try { const user = await User.findBy("email", email); const verificationToken =…
-
0
votes1
answer58
viewsQ: Compare if the value of a variable is the same as the value already saved in the database
Using Java Script, Nodejs, Adonisframework, Mysql, Lucid ORM I need to check compare if the value sent by the client through the API is the same present in my database. I need to check if the…
-
1
votes2
answers124
viewsA: How to update some fields of a table
const { email } = request.body; try { //const { email } = request.body; const user = await User.findBy("email", email); const token =…
-
0
votes2
answers124
viewsQ: How to update some fields of a table
I am using the framework based on Java Scrit and Nodejs,Adonisjs.Need to update some fields in a table. Table fields user need to be changed, by default they come NULLS. The fields are…
-
0
votes1
answer601
viewsA: How to save a json object to mongodb, which is the answer to an API post
Solved! It was necessary to save the received value of the answer,in a new variable and then save everything in the bank.It was a very simple process and I ended up taking a while to hit the code.…
-
0
votes1
answer84
viewsQ: How to add variables concatenated into a url link?
I have the following code: var config = { method: "post", url: "https://my-api-link/v2/[email protected]&token=EAD7FC0724EF4254FG34323D62FEF2", headers: {} }; I wanted to save the…
-
0
votes2
answers368
viewsQ: How to take data from a specific field in an XML,with Nodejs,and then save it in the Mongo database
In an API response, it brings me an XML, but I need to capture just a few specific fields and save it in my database Mongodb with the package Mongoose,using Nodejs and Axios. My XML response comes…
-
0
votes1
answer601
viewsQ: How to save a json object to mongodb, which is the answer to an API post
I need to save a certain field,from a json object,which comes from the response of an API I called. Save some fields of this response json object,in some fields of my colletion/model on Mongodb also…
-
0
votes2
answers544
viewsA: Error starting nodejs+Sequelize+mysql project
After installing the sequel as Sergio said,. npm install --save mysql2
-
0
votes1
answer689
viewsA: Insert values from a variable into the database with nodejs, mysql and sequelize
Solved! Just take out the $set and add the sequelize update method. await user.update({ passwordResetToken: token, passwordResetExpires: now })
-
0
votes1
answer689
viewsQ: Insert values from a variable into the database with nodejs, mysql and sequelize
I’m trying to input into the database the contents of the variables: token and now. The respective fields in the table users of the bank are: passwordResetToken and passwordResetExpires. I can…
-
0
votes1
answer318
viewsA: Problem doing password update in DB. - PHP, PDO, MYSQL-
I was able to solve with only two lines. Since the error was that the id_usuario variable was undefined, I did it as follows. In the file that makes the recadastro: session_start(); $id_usuario =…
-
0
votes1
answer318
viewsQ: Problem doing password update in DB. - PHP, PDO, MYSQL-
I am calling a function from a class. This function is used to change the user password in db. The class file contains: <?php class Usuario { private $pdo; /*criando variavel para usar nas…
-
-1
votes2
answers449
viewsA: Error-Laravel php Artisan
I had the same problem climbing up an Laravel Github project. I had the same error as: Runtimeexception in Encrypter.php line 43: Running php Artisan key:generate worked perfectly.
-
0
votes1
answer170
viewsA: Pass two variables concatenated into a Json object of a PHP POST Curl
I managed to solve it in a simple way. I created a second variable that stores $mes / $ano and then set the variable to "Expirationdate" => "$dataexp" . Concatenating as follows: $dataexp =…
-
0
votes1
answer170
views