Skip to content
This repository was archived by the owner on Aug 8, 2019. It is now read-only.

Commit 40c7608

Browse files
author
Lian Nivin
committed
Fix PR
1 parent 12d6a43 commit 40c7608

5 files changed

Lines changed: 5 additions & 12 deletions

File tree

api/app/controllers/application_controller.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def render_unauthorized(message)
1919
end
2020

2121
def authenticate_token
22-
user = User.first
23-
# User.find_by_token(cookies.signed[:auth_token])
22+
user = User.find_by_token(cookies.signed[:auth_token])
2423
regenerate_and_signed_token(user) if user
2524
end
2625

api/app/controllers/bookings_controller.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

api/app/controllers/sport_fields_controller.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ def schedule
1919
bookings = @sport_field.bookings.where("DATE(date) = ?", params[:selectedDate])
2020
club = @sport_field.club
2121
render json: {club: club, bookings: bookings}
22-
# CREAR UNA VISTA en el CLIENTE y crear un servicio para traerlo
23-
# start_hour: 14, end_hour: 15
2422
end
2523

2624

api/app/models/booking.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
class Booking < ApplicationRecord
2-
end
2+
3+
end

api/db/schema.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@
9292
end
9393

9494
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
95-
add_foreign_key "favorites", "clubs"
96-
add_foreign_key "favorites", "users"
9795
add_foreign_key "bookings", "sport_fields"
9896
add_foreign_key "bookings", "users"
97+
add_foreign_key "favorites", "clubs"
98+
add_foreign_key "favorites", "users"
9999
add_foreign_key "sport_fields", "clubs"
100100
end

0 commit comments

Comments
 (0)