This repository was archived by the owner on Jun 21, 2020. It is now read-only.
El nodehost#17
Open
Rian501 wants to merge 9 commits into
Open
Conversation
…verting to bracket notation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed:
I switched the inputs to bracket notation, because that is what the JSON parser is able to give back on the keys with spaces ("Contact ID" for example).
I also npm-installed the cors package again, and set it up to run as middleware on all requests.
To test:
Make sure you have run
npm installat the root of the project as well as in the lib folder.Run
npm startin the lib folderRun
gruntin the lib folderTry to upload a file - it will give SQLITE errors and will console log pieces of info if you adjust the console log.
It will successfully pass the array of objects, but the issue is in the insert to db function -- if anyone wants to take a look, please do! I can still get my fake objects into the DB with the commented-out function, but the passed in ones must be missing something.