yTakkar / React-Instagram-Clone-2.0

A reactive Single-Page Instagram-Clone with some new features!! πŸ’ͺπŸ“ΈπŸ‘“ - No longer maintained.
MIT License
986 stars 454 forks source link

Throws multiple SQL errors in different areas #65

Open entrptaher opened 5 years ago

entrptaher commented 5 years ago

I was testing this out and found multiple errors on the log mostly related to SQL. Here are some,

Another thing is, it says MERN stack but MERN stands for MongoDB, Express, React, NodeJS. Though it's a minor issue. It looks promising, so I might try some PR though.

alsong commented 5 years ago

Its open source, am sure the owner wont mind some PRs

entrptaher commented 5 years ago

One of the fixes I tried was to apply this on SQL. But it's really dangerous.

SET GLOBAL sql_mode = '';
callofcash commented 5 years ago

Can someone make available a improved version ?

pmbranco commented 4 years ago

I got it working on my side. You got to change the default values of the user columns, allow null or set a default value.

Also, when creating a post with no group, it tries to insert undefined, and it should be an int. So you got another error. You can fix that by changing the routes/api/post/post-routes.js to check that value for undefined, and if so, change it to 0. Something like this:

    group_id: (group === 'undefined') ? 0 : group,

I believe it has more issues, but I am fixing them as they come up.

devHaseeb commented 3 years ago

anybody got an improved version?