-
Notifications
You must be signed in to change notification settings - Fork 2
Cli importer csv #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Cli importer csv #283
Conversation
example.zip |
2242d09
to
35c5f44
Compare
… convertion to JSON, (via API request)
35c5f44
to
a5ff835
Compare
@@ -156,6 +157,14 @@ function adminCategoryController({ | |||
res.json(categories); | |||
}; | |||
|
|||
const all = async ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might quickly become a perf hog and cause issues for larger sets, better use paginated query/response?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct me if I'm wrong, but it looks like this isn't being used anywhere. Also, it looks like browseMain already implements what this intends to do but with pagination. Should it be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't checked the whole PR, just noticed it's there, but we should definitely delete it if it's a dead code. It's a bit muddle with merge commits, so probably best to rebase on main / clean-up of dead code and put into main.
a76af83
to
bba98c5
Compare
…efactoring and fixes The script now also generates a local-categories.json. Fixed a few typos. Added additional logs. Added trim() since to account for accidental whitespaces. Replaced some for...of loops with Promise.all.
…t wanted by locale Replace more for...of loops with promise.all so they can run in parallel. When creating local foods, exclude foods that are not wanted by the locale.
Previously, the associated foods/categories were incomplete. Associated categories codes were considered as food code even though they are not. Now, it correctly searches the database to identify whether it is a food code or category code.
Use short circuiting; Replace array includes with set has for linear time complexity; Add more error handling
Adding the converting tool to the CLI for the food-table CSV conversion to the package format.