diff --git a/app/controllers/vouchers_controller.rb b/app/controllers/vouchers_controller.rb index 16ff4d8..be46b16 100644 --- a/app/controllers/vouchers_controller.rb +++ b/app/controllers/vouchers_controller.rb @@ -25,7 +25,7 @@ class VouchersController < ApplicationController @voucher = Voucher.new(voucher_params) if @voucher.save - output = %x(mcrcon -c -H mine.vereto.net -p #{ENV["MC_RCON_PASS"]} "whitelist add #{params[:vouchee]}") + output = `mc-whitelist-users #{params[:vouchee]}` render json: { :message => output }.to_json, status: :created, location: @voucher else render json: @voucher.errors, status: :unprocessable_entity