{"action":"created","issue":{"url":"https://api.github.com/repos/nextcloud/deck/issues/535","repository_url":"https://api.github.com/repos/nextcloud/deck","labels_url":"https://api.github.com/repos/nextcloud/deck/issues/535/labels{/name}","comments_url":"https://api.github.com/repos/nextcloud/deck/issues/535/comments","events_url":"https://api.github.com/repos/nextcloud/deck/issues/535/events","html_url":"https://github.com/nextcloud/deck/pull/535","id":341200220,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNDMwODI0","number":535,"title":"REST API","user":{"login":"Nebri","id":3360697,"node_id":"MDQ6VXNlcjMzNjA2OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3360697?v=4","gravatar_id":"","url":"https://api.github.com/users/Nebri","html_url":"https://github.com/Nebri","followers_url":"https://api.github.com/users/Nebri/followers","following_url":"https://api.github.com/users/Nebri/following{/other_user}","gists_url":"https://api.github.com/users/Nebri/gists{/gist_id}","starred_url":"https://api.github.com/users/Nebri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nebri/subscriptions","organizations_url":"https://api.github.com/users/Nebri/orgs","repos_url":"https://api.github.com/users/Nebri/repos","events_url":"https://api.github.com/users/Nebri/events{/privacy}","received_events_url":"https://api.github.com/users/Nebri/received_events","type":"User","site_admin":false},"labels":[{"id":594507147,"node_id":"MDU6TGFiZWw1OTQ1MDcxNDc=","url":"https://api.github.com/repos/nextcloud/deck/labels/3.%20to%20review","name":"3. to review","color":"0052cc","default":false},{"id":529338419,"node_id":"MDU6TGFiZWw1MjkzMzg0MTk=","url":"https://api.github.com/repos/nextcloud/deck/labels/backend","name":"backend","color":"c2e0c6","default":false},{"id":521151722,"node_id":"MDU6TGFiZWw1MjExNTE3MjI=","url":"https://api.github.com/repos/nextcloud/deck/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/nextcloud/deck/milestones/15","html_url":"https://github.com/nextcloud/deck/milestone/15","labels_url":"https://api.github.com/repos/nextcloud/deck/milestones/15/labels","id":3458963,"node_id":"MDk6TWlsZXN0b25lMzQ1ODk2Mw==","number":15,"title":"0.5.0","description":"","creator":{"login":"juliushaertl","id":3404133,"node_id":"MDQ6VXNlcjM0MDQxMzM=","avatar_url":"https://avatars0.githubusercontent.com/u/3404133?v=4","gravatar_id":"","url":"https://api.github.com/users/juliushaertl","html_url":"https://github.com/juliushaertl","followers_url":"https://api.github.com/users/juliushaertl/followers","following_url":"https://api.github.com/users/juliushaertl/following{/other_user}","gists_url":"https://api.github.com/users/juliushaertl/gists{/gist_id}","starred_url":"https://api.github.com/users/juliushaertl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliushaertl/subscriptions","organizations_url":"https://api.github.com/users/juliushaertl/orgs","repos_url":"https://api.github.com/users/juliushaertl/repos","events_url":"https://api.github.com/users/juliushaertl/events{/privacy}","received_events_url":"https://api.github.com/users/juliushaertl/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":3,"state":"open","created_at":"2018-06-28T08:53:51Z","updated_at":"2018-07-15T13:13:42Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2018-07-14T02:05:25Z","updated_at":"2018-07-16T10:02:35Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/nextcloud/deck/pulls/535","html_url":"https://github.com/nextcloud/deck/pull/535","diff_url":"https://github.com/nextcloud/deck/pull/535.diff","patch_url":"https://github.com/nextcloud/deck/pull/535.patch"},"body":"The big heavy development work is now done and ready for it's first review round.\r\n\r\nI'm planning on writing a series of unit tests against the Api Controllers, and after doing the rebase a bunch of unit tests that were passing are no longer. I'll start taking a look at these units tests later this weekend.\r\n\r\nWhen this PR gets merged it will close Issue #83 "},"comment":{"url":"https://api.github.com/repos/nextcloud/deck/issues/comments/405200555","html_url":"https://github.com/nextcloud/deck/pull/535#issuecomment-405200555","issue_url":"https://api.github.com/repos/nextcloud/deck/issues/535","id":405200555,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTIwMDU1NQ==","user":{"login":"juliushaertl","id":3404133,"node_id":"MDQ6VXNlcjM0MDQxMzM=","avatar_url":"https://avatars0.githubusercontent.com/u/3404133?v=4","gravatar_id":"","url":"https://api.github.com/users/juliushaertl","html_url":"https://github.com/juliushaertl","followers_url":"https://api.github.com/users/juliushaertl/followers","following_url":"https://api.github.com/users/juliushaertl/following{/other_user}","gists_url":"https://api.github.com/users/juliushaertl/gists{/gist_id}","starred_url":"https://api.github.com/users/juliushaertl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliushaertl/subscriptions","organizations_url":"https://api.github.com/users/juliushaertl/orgs","repos_url":"https://api.github.com/users/juliushaertl/repos","events_url":"https://api.github.com/users/juliushaertl/events{/privacy}","received_events_url":"https://api.github.com/users/juliushaertl/received_events","type":"User","site_admin":false},"created_at":"2018-07-16T10:02:35Z","updated_at":"2018-07-16T10:02:35Z","author_association":"MEMBER","body":"> Is this true for all the exceptions that could be occuring in the rest api? I've taken a look at SharingMiddleware and I've noticed it's taking exceptions and returning out json responses.\r\n\r\nYes, at least for the NoPermissionException, which is a StatusException that is catched by the Middleware.\r\n\r\n> if you look at the Board / Stack api controllers I've defined, I'm also trying to build the same json responses using the DataResponse class. Am I essentially creating duplicating code that I don't need to?\r\n\r\nYou can get rid of those checks:\r\n```\r\nif ($board === false || $board === null) {\r\n```\r\n\r\nThe middleware will automatically return a JSONResponse for any StatusException that is thrown in a controller. \r\n\r\nWe probably should also move the other checks to the services and just throw a StatusException for those as well, but I need to think about that a bit."}}
{"actor":{"display_login":"juliushaertl"}}