CS580-Thunderbird / study-hard-play-hard

CS580 group project - A personal organizer to help cpp students manage time and enjoy life
0 stars 1 forks source link

Provide POST data to set organizer of events to backend #39

Closed nan2iz closed 7 years ago

nan2iz commented 7 years ago

This is from the user settng, After user set the preference, you should add POST method and send JSON data to backend.

screen shot 2017-02-05 at 10 45 30 pm

nan2iz commented 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

wiehsingli commented 7 years ago

can you check if I have set up POST correctly on back end?

nan2iz commented 7 years ago

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

nan2iz commented 7 years ago

The Json should look like: {"preferSet" : ["1","2"]}

wiehsingli commented 7 years ago

the 1 and 2 are the are different event preferences?

nan2iz commented 7 years ago

The numbers that represent event ID. The IDs are from "data/organizers"

wiehsingli commented 7 years ago

added post resembling the example.

nan2iz commented 7 years ago

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.

01_01

nan2iz commented 7 years ago

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.