Add whitelist add command

This commit is contained in:
conor 2019-10-21 11:24:16 +02:00
parent 6849e16491
commit dd1a5c6f85

View file

@ -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