mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-31 03:25:45 +00:00
Start of api
This commit is contained in:
10
app/controllers/api_controller.rb
Normal file
10
app/controllers/api_controller.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class ApiController < ApplicationController
|
||||
|
||||
def tournaments
|
||||
@tournaments = Tournament.all
|
||||
end
|
||||
|
||||
def tournament
|
||||
@tournament = Tournament.where(:id => params[:tournament]).includes(:schools,:weights,:mats,:matches,:user,:wrestlers).first
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user