Skip to content

Saving params for task - #80

Open
shashwatrathod wants to merge 6 commits into
mainfrom
hitId_migration
Open

Saving params for task#80
shashwatrathod wants to merge 6 commits into
mainfrom
hitId_migration

Conversation

@shashwatrathod

Copy link
Copy Markdown
Contributor
  • Created a new MySQL table - worker_params that stores workerID and JSON-stringified set of params.
  • Added two new methods in db/annonUser.js to save params for a user in the db and get params for a particular worker from the db.
  • Added two new helper methods in filters to check for parameters in body and query params. This was done for:
    a. Readability
    b. Avoiding confusion in knowing where the parameter should actually belong
  • Added a new POST route /api/tasks/saveParams that..well..saves the parameters supplied to it in the db.
  • When the taskController loads, we now hit /api/tasks/saveParams to save the set of parameters that the worker entered the page with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant