Create an endpoint in gladiator at /api/v1/unsubscribe that will take an northstar id and competition id and flag them as unsubscribed for that competition messaging.
Things needed:
Create a route in Routes.php in the /api/v1 group at /unsubscribe
Create an UnsubscribeController that has a unsubscribe method that gets hit when that new endpoint is hit.
Create an UnsubscribeRequest class that gets passed to the unsubscribe method and validates the incoming request
In the unsubscribe(UnsubscribeRequest $request) method, gets the user, and sets them as unsubscribes for the competition that is passed in the request.
Return a json response from unsubscribe() that confirms that unsubscribe was successful, or errors that something went wrong: { message: 'success' }
Create an endpoint in gladiator at
/api/v1/unsubscribe
that will take an northstar id and competition id and flag them as unsubscribed for that competition messaging.Things needed:
Routes.php
in the/api/v1
group at/unsubscribe
UnsubscribeController
that has aunsubscribe
method that gets hit when that new endpoint is hit.UnsubscribeRequest
class that gets passed to theunsubscribe
method and validates the incoming requestunsubscribe(UnsubscribeRequest $request)
method, gets the user, and sets them as unsubscribes for the competition that is passed in the request.unsubscribe()
that confirms that unsubscribe was successful, or errors that something went wrong:{ message: 'success' }