app/controllers/ishapi/payments_controller.rb in ishapi-0.1.8.204 vs app/controllers/ishapi/payments_controller.rb in ishapi-0.1.8.205
- old
+ new
@@ -5,11 +5,11 @@
before_action :check_profile, only: %i| create2 unlock |
# alphabetized : )
##
- ## this is for invoices on wasya.co, isn't it?
+ ## this was for invoices on wasya.co
## 20200712
##
def create
authorize! :open_permission, ::Ishapi
begin
@@ -104,9 +104,12 @@
end
render status: 200, json: { status: :ok }
end
+ ##
+ ## Spend an unlock without spending money. _vp_ 2022-03-01
+ ##
def unlock
authorize! :unlock, ::Ish::Payment
item = Object::const_get(params['kind']).find params['id']
existing = Purchase.where( user_profile: @current_profile, item: item ).first