-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates oven page automatically when cookie is ready #6
Conversation
- Puts cookie retrieval markup in separate partial - Adds SSE support on ovens controller - Adds SSE listener on the client side Issue: #5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs revert, 2 problems found (see the comments)
let cookieStatus, eventSource; | ||
|
||
cookieStatus = document.querySelector('.cookie-status'); | ||
eventSource = new EventSource('/ovens/2/progress'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded Oven ID
@@ -16,4 +19,19 @@ def empty | |||
end | |||
redirect_to @oven, alert: 'Oven emptied!' | |||
end | |||
|
|||
def progress | |||
@oven = Oven.find(params[:id]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security issue here: A User is able to query the Cookie status in other Users Ovens
@@ -1,4 +1,7 @@ | |||
class OvensController < ApplicationController | |||
include ActionController::Live |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes RSpec to stop working for some reason I don't fully understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See issue #9 for more information
Issue: #5