rokwire / surveys-building-block

Building Block that manages surveys in the Rokwire Platform.
Apache License 2.0
0 stars 1 forks source link

[BUG] Fix delete survey APIs #25

Closed roberlander2 closed 1 year ago

roberlander2 commented 1 year ago

Describe the bug The transaction in deleteSurvey mixes up the orgID and appID arguments passed into GetSurvey, so surveys cannot be retrieved for deletion.

To Reproduce Steps to reproduce the behavior:

  1. Create a survey
  2. Try to delete the survey
  3. See error

Expected behavior These arguments should be fixed so surveys can be found correctly. A unique partial index on calendar_event_id should be added to the surveys collection to prevent multiple surveys using the same calendar_event_id from being created.