{"action":"closed","issue":{"url":"https://api.github.com/repos/dc-wdi-22/seekr-backend/issues/14","repository_url":"https://api.github.com/repos/dc-wdi-22/seekr-backend","labels_url":"https://api.github.com/repos/dc-wdi-22/seekr-backend/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/dc-wdi-22/seekr-backend/issues/14/comments","events_url":"https://api.github.com/repos/dc-wdi-22/seekr-backend/issues/14/events","html_url":"https://github.com/dc-wdi-22/seekr-backend/issues/14","id":321289007,"number":14,"title":"Linking objects/models in the backend","user":{"login":"jasonptoups","id":36921152,"avatar_url":"https://avatars2.githubusercontent.com/u/36921152?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonptoups","html_url":"https://github.com/jasonptoups","followers_url":"https://api.github.com/users/jasonptoups/followers","following_url":"https://api.github.com/users/jasonptoups/following{/other_user}","gists_url":"https://api.github.com/users/jasonptoups/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonptoups/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonptoups/subscriptions","organizations_url":"https://api.github.com/users/jasonptoups/orgs","repos_url":"https://api.github.com/users/jasonptoups/repos","events_url":"https://api.github.com/users/jasonptoups/events{/privacy}","received_events_url":"https://api.github.com/users/jasonptoups/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-08T18:05:56Z","updated_at":"2018-05-08T19:41:01Z","closed_at":"2018-05-08T19:41:01Z","author_association":"CONTRIBUTOR","body":"We set up our backend with hyperlinked serializers like we did in class, but we noticed it's causing some problems on our front end. For example, here is the job object that is being returned in JSON format:\r\n```\r\n    {\r\n        \"company\": \"http://localhost:8000/company/4\",\r\n        \"title\": \"Technical Specialist\",\r\n        \"description\": \"You help new owners get started and current ones get quick, efficient support — developing strong, positive relationships with Apple. \",\r\n        \"requirements\": \"Ability to assess customers\\\\’ support needs when they arrive, then provide solutions or refer them to other team members. \",\r\n        \"salary_range_start\": 36000,\r\n        \"salary_range_end\": 50000,\r\n        \"source\": \"glassdoor\",\r\n        \"notes\": \"yes\",\r\n        \"date_posted\": \"2018-02-12\",\r\n        \"todo_list\": [\r\n            \"http://localhost:8000/todos/5\"\r\n        ],\r\n        \"job_status\": \"Applied\"\r\n    },\r\n```\r\n\r\nThe Company and To Do list section are giving us links, but we want them to be objects. For example, we would prefer it look like this, where it shows objects instead of links. Or is it better to keep it as links and have our front end pull the API again? :\r\n\r\n```\r\n    {\r\n        \"company\": {\r\n    \"name\": \"Apple\",\r\n    \"industry\": \"Information Technology\",\r\n    \"address\": \"Cupertino, CA\",\r\n    \"url\": \"https://www.apple.com/\",\r\n    \"glassdoor_link\": \"https://www.glassdoor.com/Overview/Working-at-Apple-EI_IE1138.11,16.htm\",\r\n    \"jobs\": [\r\n        \"http://localhost:8000/job/2\",\r\n        \"http://localhost:8000/job/1\"\r\n    ]\r\n}\r\n        \"title\": \"Technical Specialist\",\r\n        \"description\": \"You help new owners get started and current ones get quick, efficient support — developing strong, positive relationships with Apple. \",\r\n        \"requirements\": \"Ability to assess customers\\\\’ support needs when they arrive, then provide solutions or refer them to other team members. \",\r\n        \"salary_range_start\": 36000,\r\n        \"salary_range_end\": 50000,\r\n        \"source\": \"glassdoor\",\r\n        \"notes\": \"yes\",\r\n        \"date_posted\": \"2018-02-12\",\r\n        \"todo_list\": [\r\n            {\r\n    \"status\": false,\r\n    \"name\": \"Set up app\"\r\n}\r\n        ],\r\n        \"job_status\": \"Applied\"\r\n    },\r\n```\r\n\r\n"}}
{"actor":{"display_login":"aspittel"}}