Please include the issue number the pull request fixes by replacing YOUR-ISSUE-HERE in the text below.
Fixes #38
Summary
Add last index to the sendSms function. But having problem doe to lack of experience with Go.
Details
add last index value to the subscribe service
add LastIndex variable to the sendSMS service
in sendNotification point to the lastIndex variable as index to select from notification dataset
in Handler function trying to update record in MongoDB, but having a problem: multiple-value phoneNumbersCollection.UpdateOne() in single-value context.
-- potential solution: create new function which will connect to DB again and update values. I believe that there is a way to do that within Handler function without necessity to repeat connection to DB code, but I'm a bit lost.
Feedback and assistance very much appreciate!
Test Plan (required)
Not ready for testing
Final Checklist
[ ] For CoronaTracker, did you bump the version in package.json?
⚠️ IMPORTANT: Please do not create a Pull Request without creating an Issue first.
All changes need to be discussed before proceeding. Failure to do so may result in the pull request being rejected.
Before submitting a pull request, please be sure to review:
Please include the issue number the pull request fixes by replacing YOUR-ISSUE-HERE in the text below.
Fixes #38
Summary
Add last index to the sendSms function. But having problem doe to lack of experience with Go.
Details
subscribe
serviceLastIndex
variable to the sendSMS servicesendNotification
point to thelastIndex
variable as index to select from notification datasetHandler
function trying to update record in MongoDB, but having a problem:multiple-value phoneNumbersCollection.UpdateOne() in single-value context
. -- potential solution: create new function which will connect to DB again and update values. I believe that there is a way to do that withinHandler
function without necessity to repeat connection to DB code, but I'm a bit lost.Feedback and assistance very much appreciate!
Test Plan (required)
Not ready for testing
Final Checklist
package.json
?1.0.9
=>1.0.10
yarn
notnpm
? (important!)yarn lint
on the code?