Open Adrian1707 opened 7 years ago
so @Adrian1707 - this is a work in progress [WIP] spike? there's no need for tests, or to agonize about their absence :-), if we're clear about labelling the type of PR ...
This looks like a great start, but I'd worry a little about method length - we probably want the hits on the RESTful endpoint to be going through some wrapper of convenience functions ...
oops, maybe I should have put above in official review? sorry still getting used to this new GH PR review thing :-) I'm an old school comments guy ... :-)
hi @Adrian1707 - how are things going here - should we have a session on this ...?
Hey @tansaku ! What else do you think is preventing this from merging? We have tests now, but what else was there we needed for this story?
hi @Adrian1707 - sorry for delay - just working out what is needed ... superficially looking pretty good
@Adrian1707 we just reviewed and this does the job - just going to reflect on whether we want some structural changes to get ready for the other things we will want, such as continuing existing votes, parallel votes and so on ...
The purpose of this PR is to allow the Slackbot to post stories and votes to the backend API. I've used the request package as a HTTP client similar to what was used in the React interface. Now when a new vote on a story is started in the channel, that will get posted as a new "Story" to our backend. Similarly, when an individual casts their vote, this will get POSTed as a vote on that story that's currently being voted on.
Improvements:
Again, I don't have any tests. I see this as a weakness on my part and it's something I'd like to improve on in one of our pairing sessions @tansaku . My issue is I'm busy trying to get something working in order to feel like progress is being made, but I'd like to have some tests for this which mock the calls to the backend. I just struggle to know where to start and it's something I'd like to improve