{"action":"created","issue":{"url":"https://api.github.com/repos/DinisCruz/Maturity-Models/issues/77","repository_url":"https://api.github.com/repos/DinisCruz/Maturity-Models","labels_url":"https://api.github.com/repos/DinisCruz/Maturity-Models/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/DinisCruz/Maturity-Models/issues/77/comments","events_url":"https://api.github.com/repos/DinisCruz/Maturity-Models/issues/77/events","html_url":"https://github.com/DinisCruz/Maturity-Models/issues/77","id":160369599,"number":77,"title":"Refactor Api controllers default code into separate class","user":{"login":"DinisCruz","id":656739,"avatar_url":"https://avatars.githubusercontent.com/u/656739?v=3","gravatar_id":"","url":"https://api.github.com/users/DinisCruz","html_url":"https://github.com/DinisCruz","followers_url":"https://api.github.com/users/DinisCruz/followers","following_url":"https://api.github.com/users/DinisCruz/following{/other_user}","gists_url":"https://api.github.com/users/DinisCruz/gists{/gist_id}","starred_url":"https://api.github.com/users/DinisCruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DinisCruz/subscriptions","organizations_url":"https://api.github.com/users/DinisCruz/orgs","repos_url":"https://api.github.com/users/DinisCruz/repos","events_url":"https://api.github.com/users/DinisCruz/events{/privacy}","received_events_url":"https://api.github.com/users/DinisCruz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DinisCruz/Maturity-Models/labels/P1","name":"P1","color":"006b75"},{"url":"https://api.github.com/repos/DinisCruz/Maturity-Models/labels/refactor","name":"refactor","color":"c5def5"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-15T08:49:46Z","updated_at":"2016-06-27T09:26:54Z","closed_at":"2016-06-27T09:26:54Z","body":"all this is generic and applies to all controllers, so it should be moved into a class called 'Api-Base'\r\n\r\n```coffee\r\nData_Project  = require '../backend/Data-Project'\r\nexpress       = require 'express'\r\n\r\nclass Api_Project\r\n  constructor: (options)->\r\n    @.options      = options || {}\r\n    @.data_Project = new Data_Project()\r\n    @.router      = express.Router()\r\n    @.app         = @.options.app\r\n\r\n\r\n  add_Routes: ()=>\r\n    @.router.get '/project/list'          , @.list\r\n\r\n\r\nmodule.exports = Api_Project\r\n```"},"comment":{"url":"https://api.github.com/repos/DinisCruz/Maturity-Models/issues/comments/228695970","html_url":"https://github.com/DinisCruz/Maturity-Models/issues/77#issuecomment-228695970","issue_url":"https://api.github.com/repos/DinisCruz/Maturity-Models/issues/77","id":228695970,"user":{"login":"DinisCruz","id":656739,"avatar_url":"https://avatars.githubusercontent.com/u/656739?v=3","gravatar_id":"","url":"https://api.github.com/users/DinisCruz","html_url":"https://github.com/DinisCruz","followers_url":"https://api.github.com/users/DinisCruz/followers","following_url":"https://api.github.com/users/DinisCruz/following{/other_user}","gists_url":"https://api.github.com/users/DinisCruz/gists{/gist_id}","starred_url":"https://api.github.com/users/DinisCruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DinisCruz/subscriptions","organizations_url":"https://api.github.com/users/DinisCruz/orgs","repos_url":"https://api.github.com/users/DinisCruz/repos","events_url":"https://api.github.com/users/DinisCruz/events{/privacy}","received_events_url":"https://api.github.com/users/DinisCruz/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T09:26:54Z","updated_at":"2016-06-27T09:26:54Z","body":"this is now done\r\n\r\nAll express controllers extend the ```Api_Base``` class\r\n\r\n![image](https://cloud.githubusercontent.com/assets/656739/16375031/4d792ba2-3c51-11e6-9f1d-74c100357b12.png)\r\n\r\nlike this\r\n\r\n![image](https://cloud.githubusercontent.com/assets/656739/16375104/a86564d6-3c51-11e6-8c7e-d32f7fe9bbc6.png)\r\n"}}
{"actor":{"display_login":"DinisCruz"}}