Closed mashfiqui-rabbi closed 3 years ago
@eurashin @sarahrathnam
The code for storing one signal id is in the following place. The one signal id gets reported to the server every time the aquarium page is opened. This gives us the most update onesignal id.
Note here: I have updated the onesignal id frequently for a few reasons:
The id is received in the user registration microservice I believe. The end point is /store-onesignal-id
. You can see how it is used in the following link
https://github.com/StatisticalReinforcementLearningLab/SARAv2/blob/2da811d27da22f87ee1befc83b7862d4e12f6599/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts#L327
The following angular service handles the assignment and update of the onesignal id https://github.com/StatisticalReinforcementLearningLab/SARAv2/blob/2da811d27da22f87ee1befc83b7862d4e12f6599/src/app/notification/one-signal.service.ts
Code of where we are storing the onesignal id locally. https://github.com/StatisticalReinforcementLearningLab/SARAv2/blob/2da811d27da22f87ee1befc83b7862d4e12f6599/src/app/notification/one-signal.service.ts#L74
Hi Mash, thanks! The onesignal ids are now updating. Let me review the acceptance criteria so we can close this issue.
There is only one minor comment! You mentioned:
The id is received in the user registration microservice I believe.
But within the environment.ts file, and the SARAv2/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts
file, the server that receives the /store-onesignal-id
command is actually the flaskServerForIncentives
server. I think this needs to be updated for the SARA-dev team.
Acceptance criteria: