janastu / pondy-heritage-web

Web application for Pondy heritage
0 stars 1 forks source link

New api integration - join group, edit/delete feature, #65

Open salus-sage opened 8 years ago

salus-sage commented 8 years ago

Join group curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "X-Auth-Token: admin:1466868123925:bfb8ee11389dfac8e4e5bf7ab85a0c48" "http://127.0.0.1:8080/api/registerToGroup/user/admin/group/1?reason=chummma" - for REGISTERING to a group !

[8:03]
curl -X GET --header "Accept: application/json" --header "X-Auth-Token: admin:1466868123925:bfb8ee11389dfac8e4e5bf7ab85a0c48"

Join group has bugs, after joining the user's groups collection is not updated

awaiting edit and delete api from api owner

salus-sage commented 8 years ago

EDIT API tested in postman: http://192.168.1.97:8080/api/editNewMediaHeritageForm2?id=72&appId=PondyMap&userName=admin&groupId=1&title=rrrrrrrr&description=rrrrrrrrrr&category=Built%20Heritage&language=English&latitude=11&longitude=11&mediatype=1&uploadTime=Jun%2029%2C%202016%2010%3A19%3A36%20PM&userAgent=chrome&fileOrURLLink=camera.png

tested postman - needs token: curl -X DELETE --header "Accept: application/json" --header "X-Auth-Token: admin:1466868123925:bfb8ee11389dfac8e4e5bf7ab85a0c48" "http://127.0.0.1:8080/api/heritageMedias/1" -edit Delete request from browser always returns unauthorized

salus-sage commented 8 years ago

Join group api returns unauthorized access.. below is postman request summary

POST /heritageweb/api/registerToGroup/user/admin/group/3?reason=chummma HTTP/1.1 Host: 196.12.53.138:8080 Accept: application/json Auth-Token: admin:1472830117575:436449e8df0155a2e3efc11cb972b3c5 Cache-Control: no-cache Postman-Token: c34aaf9d-c6aa-fca1-64c1-740b5ed097a8 Content-Type: application/x-www-form-urlencoded

salus-sage commented 8 years ago

http://196.12.53.138:8080/heritageweb/api/getUserGroups/user/userid(str) with auth token in headers

salus-sage commented 8 years ago

http://196.12.53.138:8080/heritageweb/api/registerToGroup/user/beeboi/group/3?reason=testingagain with auth token in headers

salus-sage commented 8 years ago

custom authorization header x-auth-token request is not going through to the server https://spring.io/blog/2015/01/20/the-resource-server-angular-js-and-spring-security-part-iii

requests only work with curl, or postman but not from a browser.

salus-sage commented 8 years ago

No data to refer to language preferences, meaning post request has a language input field, however get does not include the param for map features. @muralihr