Mesmo vendo os forums, eu não estou conseguindo ainda gravar no banco de dados.... Parece que não está indo a query do jeito que deveria. Alguém poderia dar um help?
Git do acompanhamento da aula.
https://github.com/maxhiroito2/apiautenticacao
C:\Programming\apiAu>npm start
> api@0.0.1 start C:\Programming\apiAu
> nodemon index.js
[nodemon] 1.18.4
[nodemon] to restart at any time, enter rs
[nodemon] watching: *.*
[nodemon] starting node index.js
consign v0.1.6 Initialized in C:\Programming\apiAu
+ .\rotas\pagamentos.js
+ .\persistencia\connectionFactory.js
+ .\persistencia\PagamentoDao.js
servidor rodando na porta 3000
processano um novo pagamento
pagamento criado undefined
{ Error: ER_BAD_FIELD_ERROR: Unknown column '{ "forma_de_pagamento": "banco de teste", "valor": 10.00, "moeda": "BRL", "descricao": "criando pagamento"}' in 'field list'
at Query.Sequence._packetToError (C:\Programming\apiAu\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
at Query.ErrorPacket (C:\Programming\apiAu\node_modules\mysql\lib\protocol\sequences\Query.js:77:18)
at Protocol._parse
Packet (C:\Programming\apiAu\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\Programming\apiAu\node_modules\mysql\lib\protocol\Parser.js:433:10)
at Parser.write (C:\Programming\apiAu\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (C:\Programming\apiAu\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket.<anonymous> (C:\Programming\apiAu\node_modules\mysql\lib\Connection.js:91:28)
at Socket.<anonymous> (C:\Programming\apiAu\node_modules\mysql\lib\Connection.js:525:10)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
--------------------
at Protocol._enqueue (C:\Programming\apiAu\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Connection.query (C:\Programming\apiAu\node_modules\mysql\lib\Connection.js:201:25)
at PagamentoDao.salva (C:\Programming\apiAu\persistencia\PagamentoDao.js:6:22)
at C:\Programming\apiAu\rotas\pagamentos.js:15:22
at Layer.handle [as handle_request] (C:\Programming\apiAu\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Programming\apiAu\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\Progra