{"action":"created","issue":{"url":"https://api.github.com/repos/thredded/thredded/issues/763","repository_url":"https://api.github.com/repos/thredded/thredded","labels_url":"https://api.github.com/repos/thredded/thredded/issues/763/labels{/name}","comments_url":"https://api.github.com/repos/thredded/thredded/issues/763/comments","events_url":"https://api.github.com/repos/thredded/thredded/issues/763/events","html_url":"https://github.com/thredded/thredded/pull/763","id":374763510,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MzczNTcy","number":763,"title":"json actions for mark_as_read and mark_as_unread for post","user":{"login":"timdiggins","id":18395,"node_id":"MDQ6VXNlcjE4Mzk1","avatar_url":"https://avatars1.githubusercontent.com/u/18395?v=4","gravatar_id":"","url":"https://api.github.com/users/timdiggins","html_url":"https://github.com/timdiggins","followers_url":"https://api.github.com/users/timdiggins/followers","following_url":"https://api.github.com/users/timdiggins/following{/other_user}","gists_url":"https://api.github.com/users/timdiggins/gists{/gist_id}","starred_url":"https://api.github.com/users/timdiggins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdiggins/subscriptions","organizations_url":"https://api.github.com/users/timdiggins/orgs","repos_url":"https://api.github.com/users/timdiggins/repos","events_url":"https://api.github.com/users/timdiggins/events{/privacy}","received_events_url":"https://api.github.com/users/timdiggins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-28T15:06:59Z","updated_at":"2018-10-30T10:47:21Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/thredded/thredded/pulls/763","html_url":"https://github.com/thredded/thredded/pull/763","diff_url":"https://github.com/thredded/thredded/pull/763.diff","patch_url":"https://github.com/thredded/thredded/pull/763.patch"},"body":"There are some \"api\" endpoints (for ajax calls from mainapp or extensions) that I need and think maybe other people might need, so I'm could pull these into Thredded core.\r\n\r\nHowever this may be unneeded.\r\n\r\nHowever I also think (as I've illustrated in this PR) that we ought to not use the hierarchical routes unless they are being shown to the user / search engines (ie. GET routes to display things). This would make the routes file a bit easier to navigate and make the url-generation functions and paths more straightforward\r\n\r\nie.\r\n```\r\nmark_as_unread_post_path(post)\r\n#  /posts/:id/mark_as_unread(.:format)\r\n```\r\n\r\nrather than\r\n```\r\nmark_as_unread_messageboard_topic_post_path(post.messageboard, post.postable, post)\r\n# /:messageboard_id/:topic_id/:id/mark_as_unread(.:format)  \r\n```\r\n\r\nUnless there are objections, we can start moving the paths across (and changing the helpers to point to the new paths), keeping the old more complex paths till the next minor bump when we can drop them. "},"comment":{"url":"https://api.github.com/repos/thredded/thredded/issues/comments/434253486","html_url":"https://github.com/thredded/thredded/pull/763#issuecomment-434253486","issue_url":"https://api.github.com/repos/thredded/thredded/issues/763","id":434253486,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDI1MzQ4Ng==","user":{"login":"glebm","id":216339,"node_id":"MDQ6VXNlcjIxNjMzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/216339?v=4","gravatar_id":"","url":"https://api.github.com/users/glebm","html_url":"https://github.com/glebm","followers_url":"https://api.github.com/users/glebm/followers","following_url":"https://api.github.com/users/glebm/following{/other_user}","gists_url":"https://api.github.com/users/glebm/gists{/gist_id}","starred_url":"https://api.github.com/users/glebm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glebm/subscriptions","organizations_url":"https://api.github.com/users/glebm/orgs","repos_url":"https://api.github.com/users/glebm/repos","events_url":"https://api.github.com/users/glebm/events{/privacy}","received_events_url":"https://api.github.com/users/glebm/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T10:47:20Z","updated_at":"2018-10-30T10:47:20Z","author_association":"COLLABORATOR","body":"For HTML routes, having deep routes allows us to show the correct navigation on \"Not Found\" (e.g. if a topic wasn't found, at least we indicate which messageboard it is).\r\n\r\nFor JSON / action type routes, I agree that deep routes are unnecessary."}}
{"actor":{"display_login":"glebm"}}