Retrospring / retrospring

Q/A based social network
https://retrospring.net
GNU Affero General Public License v3.0
242 stars 32 forks source link

Refactor subscription functionality into uses cases #342

Closed pixeldesu closed 11 months ago

pixeldesu commented 2 years ago

Read more about this in the parent issue

Functionality location: https://github.com/Retrospring/retrospring/blob/main/app/controllers/ajax/subscription_controller.rb

Additionally: While you are at it, please update the response codes accordingly. Don't think it's particularly productive to have "positive" 4xx responses.

pixeldesu commented 11 months ago

The refactored Subscription.(un)subscribe methods are already a simple enough API and don't need to be wrapped into a use case.