Patient FlagsModule REST-API throws Unknown resource

Executing the REST end point for the patient flags openmrs/ws/rest/v1/patientflags/flag throws Resource does not exist - Pastebin.com

Looking at the code, the REST API seam to have been implemented via angular and not JAVA like most of OpenMRS modules.

i have tried this on two instances,

  1. RefApp 3.x docker instance (nightly tag) where i added the patient-flags-module, open-web-apps module and also uploaded a .zip after building the patient flags owa sub-module.

  2. RefApp 2.x where i uploaded a .zip after building the patient flags owa sub-module.

cc @dkayiwa @grace

REST API support was added using this pull request: REST API Support, Bug fixes, Code improvement by maimoonak · Pull Request #25 · openmrs/openmrs-module-patientflags · GitHub but was reverted because it was mixed with so many other things that resulted into problems. Can you look into that commit and copy back only the classes that added support for REST?