Add json output of mcrcon from index of vouchers
This commit is contained in:
parent
25bd47bf12
commit
46f3314738
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue