Closed nan2iz closed 7 years ago
Sorry I was confused a little bit. Basically, you have to provide string list back to back-end. The String list contain id of event organizer that user check the checkboxes.
So create Json format and pass POST method to "/setting/add_org"
Example http://stackoverflow.com/questions/34789357/how-to-pass-liststring-in-post-method-using-spring-mvc
can you check if I have set up POST correctly on back end?
Sorry, I didn't provide you accurate example.
You have to pass parameters to backend with JSON object. And backend will retrieve data with RequestBody method.
You have to request POST method in oder to private JSON object to back-end side. Example: http://stackoverflow.com/questions/30989391/angularjs-passing-complex-json-data-using-http-post
The Json should look like: {"preferSet" : ["1","2"]}
the 1 and 2 are the are different event preferences?
The numbers that represent event ID. The IDs are from "data/organizers"
added post resembling the example.
Thanks for the update, btw I think you used the wrong button ("SEARCH CLUB FROM FACEBOOK PAGES") to pass the parameters. I think we should create save button for save the setting. Or we can change the "Serch Club" button to be "Save" for now. And then when I finish "Search club from FB" feature, so we just add this button back.
Please clean up the console and change button to be "save" instead of "Search Club From Facebook Pages" and then you can close this issue.
This is from the user settng, After user set the preference, you should add POST method and send JSON data to backend.