#250 Plus-plus service backend integration
Merged by skrzepto. Opened by skrzepto.
skrzepto/fedora-hubs plus-plus  into  develop

Download 250.patch

This will relay a plus-plus action to the plus-plus service.

This must match the plus-plus token

This name is a little ambiguous any suggestions to alter it?

Tests? I'll look into adding some. I'll need to look into mocking requests

3 new commits added

  • cleaning up mock request classes
  • adding case where trying to plus_plus a user who doesnt exist
  • adding plus_plus tests

Might be cleaner to have 2 separate endpoints, one for GET, one for POST

Small note about bool()

>>> bool('False')
True

Would you recommend for GET to have the end point /plus_plus/<user>/status and for POST `/plus_plus//update ?

makes sense.

ooh good catch let me think about this one

1 new commit added

  • seperating the status and update routes of plus_plus, adding more tests and made a bool helper function for updating karma

all(e not in flask.request.form for e in ('increment', 'decrement'))?

Looks good to me.

I think the way it is now compared to the suggestion is simpler and easier to read. So I think I'll stick with how it is.

Agree.

rebased

I just squashed the commits

Pull-Request has been merged by skrzepto

hmm just thought of one edge case right after merging. Should we force the plus_plus update/status to be for user hubs only or can groups use plus_plus as well?

Metadata