mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-09 23:06:06 +00:00
Adding controller actions and routes for pausing and unpausing a standing order
This commit is contained in:
@@ -50,6 +50,16 @@ module Admin
|
||||
end
|
||||
end
|
||||
|
||||
def pause
|
||||
@standing_order.update_attributes(paused_at: Time.zone.now)
|
||||
render_as_json @standing_order, fee_calculator: fee_calculator
|
||||
end
|
||||
|
||||
def unpause
|
||||
@standing_order.update_attributes(paused_at: nil)
|
||||
render_as_json @standing_order, fee_calculator: fee_calculator
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def permissions
|
||||
|
||||
Reference in New Issue
Block a user