Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Quote Error #519

Closed
jonathanroze opened this issue May 26, 2017 · 4 comments
Closed

Quote Error #519

jonathanroze opened this issue May 26, 2017 · 4 comments

Comments

@jonathanroze
Copy link

Hi there,

I'm working on a project and i need to implemente a Facebook login but i've an issue!

When FeatherJS need to create a user into my database (Mysql with KnexJS) i've an error : "ER_WRONG_VALUE_COUNT_ON_ROW: Column count doesn't match value count at row 1"

After some research i know why ! When FeatherJs try to add a new user it doesn't add single quote around the JSON object, and without these quote, MYSQL says.. No!

So do you have an idea to transform this ->

insert into `users` (`facebook`, `facebookId`) values ({"profile":{"id":"1306478419467189","displayName":"Popi Popo","name":{},"provider":"facebook","_raw":"{\"id\":\"1306478419467189\",\"name\":\"Popi Popo\"}","_json":{"id":"1306478419467189","name":"Popi Popo"}},"accessToken":"EAAbY4lfNNakBAokokigv5uYzoh225VZC3LwMcPcWohwwITqpQerNTjUTD2gBInKISPDft60ZBoYQ1cq950cw8v58LW4QCPy4MxLXthRgro3xNZBDxViloyI8y6THiWD8s5tGv7r822M2OrHAKZAo2Yzb0Y5zgU4x4GGq5R4ZC0AZDZD"}, '1300408410467080')

to

insert into `users` (`facebook`, `facebookId`) values ('{"profile":{"id":"1306478419467189","displayName":"Popi Popo","name":{},"provider":"facebook","_raw":"{\"id\":\"1306478419467189\",\"name\":\"Popi Popo\"}","_json":{"id":"1306478419467189","name":"Popi Popo"}},"accessToken":"EAAbY4lfNNakBAokokigv5uYzoh225VZC3LwMcPcWohwwITqpQerNTjUTD2gBInKISPDft60ZBoYQ1cq950cw8v58LW4QCPy4MxLXthRgro3xNZBDxViloyI8y6THiWD8s5tGv7r822M2OrHAKZAo2Yzb0Y5zgU4x4GGq5R4ZC0AZDZD"}', '1300408410467080')

Thank :-)

@daffl
Copy link
Member

daffl commented Jun 22, 2017

What version of feathers-authentication are you using?

@ekryski
Copy link
Member

ekryski commented Jul 4, 2017

I don't think this is a Feathers or feathers-authentication issue. Feathers-authentication isn't doing anything special to the JSON object. That is on you as the developer, to customize the data in a before hook before it is inserted in the DB.

@Clowning is this still an issue for you?

@ekryski
Copy link
Member

ekryski commented Jul 24, 2017

Since we haven't heard anything back in some time, I'm going to close this issue and assume it's been resolved. If it is still an issue we can re-open. 😄

@ekryski ekryski closed this as completed Jul 24, 2017
@jonathanroze
Copy link
Author

Oh i'm sorry ! It good, it's just because i'm stupid ! Not feathers :D ahha

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants