Refactor for authorization sanity
This commit is contained in:
+2
-2
@@ -150,7 +150,7 @@ class List
|
||||
set_price # should not be needed, but extra secure
|
||||
orders.map(&:close!) # close the connected orders
|
||||
self.state = 'closed'
|
||||
self.is_helped! if needs_help?
|
||||
self.mark_helped! if needs_help?
|
||||
self.needs_payment = false
|
||||
self.user_requests_closing = false # if a user requested closing, not needed anymore
|
||||
self.closed_at = Time.now
|
||||
@@ -173,7 +173,7 @@ class List
|
||||
end
|
||||
end
|
||||
|
||||
def is_helped!
|
||||
def mark_helped!
|
||||
self.needs_help = false
|
||||
if save
|
||||
broadcast_users 'list_helped', id: id
|
||||
|
||||
Reference in New Issue
Block a user