refactor pull requests server route to returb object instead of dictionary