mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-08 15:29:20 +00:00
Made login form look better and made user
menu look better.
This commit is contained in:
@@ -21,4 +21,8 @@ class ApiController < ApplicationController
|
||||
@tournament = Tournament.new(JSON.parse(params[:tournament]))
|
||||
@tournament.save
|
||||
end
|
||||
|
||||
def currentUserTournaments
|
||||
@tournaments = current_user.tournaments
|
||||
end
|
||||
end
|
||||
|
||||
3
app/views/api/currentUserTournaments.jbuilder
Normal file
3
app/views/api/currentUserTournaments.jbuilder
Normal file
@@ -0,0 +1,3 @@
|
||||
json.array!(@tournaments) do |tournament|
|
||||
json.extract! tournament, :id, :name, :address, :director, :director_email, :date
|
||||
end
|
||||
Reference in New Issue
Block a user