Files
ruby-sea-battle/main-server/app/controllers/api/matchmaking_controller.rb
T

9 lines
312 B
Ruby

class Api::MatchmakingController < ApplicationController
# Explicit cancellation. Normally the search is cancelled automatically
# when the MatchmakingChannel subscription is closed.
def destroy
MatchmakingService.cancel(current_user.id)
render json: { message: "Matchmaking cancelled" }
end
end