diff --git a/app/controllers/vouchers_controller.rb b/app/controllers/vouchers_controller.rb index b6c1188..6957629 100644 --- a/app/controllers/vouchers_controller.rb +++ b/app/controllers/vouchers_controller.rb @@ -6,9 +6,8 @@ class VouchersController < ApplicationController def index @vouchers = Voucher.all whitelist = `mcrcon -H mine.vereto.net -p #{ENV["MC_RCON_PASS"]} 'whitelist list' | sed 's/There are*.*whitelisted players: //g'`.split(", ") - @vouchers.zip(whitelist) - render json: @vouchers + render json: { :vouchers => @vouchers, :whitelist => whitelist }.to_json end # GET /vouchers/1