mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-31 11:35:45 +00:00
Moved api call to a service
This commit is contained in:
@@ -12,4 +12,9 @@ class ApiController < ApplicationController
|
||||
def tournament
|
||||
@tournament = Tournament.where(:id => params[:tournament]).includes(:schools,:weights,:mats,:matches,:user,:wrestlers).first
|
||||
end
|
||||
|
||||
def newTournament
|
||||
@tournament = Tournament.new(JSON.parse(params[:tournament]))
|
||||
@tournament.save
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user