Eu toda vez que dou POST no Postman, ele me mostra que está com erro
"code: 'ER_BAD_FIELD_ERROR',
errno: 1054,
sqlMessage: "Unknown column 'get' in 'field list'",
sqlState: '42S22',
index: 0,
sql: "INSERT INTO Atendimentos SET `cliente` = 'Antonio', `get` = 'Sonic', `serviço` = 'tosa', `status` = 'agendado', `observações` = 'muito bonzinho'"
}"
Ele criou a Tabela no mysql, mas fica aparecendo esse erro. O servidor e a tabela foi criada, mas continua dando esse erro.
Vou mostrar exatamento o que aparece no meu terminal aqui:
[nodemon] starting `node index.js`
conectado com sucesso
consign v0.1.6 Initialized in C:\Users\Antonio\Desktop\server
+ .\controles\atendimentos.js
servidor rodando na porta 3000
Tabela Atendimentos criada com sucesso
Error: ER_BAD_FIELD_ERROR: Unknown column 'get' in 'field list'
at Query.Sequence._packetToError (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
at Query.ErrorPacket (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\protocol\sequences\Query.js:79:18)
at Protocol._parsePacket (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\protocol\Parser.js:433:10)
at Parser.write (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket.<anonymous> (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\Connection.js:88:28)
at Socket.<anonymous> (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\Connection.js:526:10)
at Socket.emit (events.js:375:28)
at addChunk (internal/streams/readable.js:290:12)
--------------------
at Protocol._enqueue (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Connection.query (C:\Users\Antonio\Desktop\server\node_modules\mysql\lib\Connection.js:198:25)
at Atendimento.adiciona (C:\Users\Antonio\Desktop\server\models\atendimentos.js:7:17)
at C:\Users\Antonio\Desktop\server\controles\atendimentos.js:9:21
at Layer.handle [as handle_request] (C:\Users\Antonio\Desktop\server\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\Antonio\Desktop\server\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\Users\Antonio\Desktop\server\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\Users\Antonio\Desktop\server\node_modules\express\lib\router\layer.js:95:5)
at C:\Users\Antonio\Desktop\server\node_modules\express\lib\router\index.js:281:22
at Function.process_params (C:\Users\Antonio\Desktop\server\node_modules\express\lib\router\index.js:335:12) {
code: 'ER_BAD_FIELD_ERROR',
errno: 1054,
sqlMessage: "Unknown column 'get' in 'field list'",
sqlState: '42S22',
index: 0,
sql: "INSERT INTO Atendimentos SET `cliente` = 'Antonio', `get` = 'Sonic', `serviço` = 'tosa', `status` = 'agendado', `observações` = 'muito bonzinho'"
}
Os meus scripts estão todos corretos (eu acho), eu já conferi várias vezes e não achei nenhum erro.