update for tickets dependency
This commit is contained in:
parent
fc3529fb37
commit
a1a24751e3
|
@ -57,7 +57,7 @@ class Admin::RegisterApiController < ApplicationController
|
||||||
response["message"] = "Site not confirmed, please confirm the email, sent to #{site.admin_email} to proceed."
|
response["message"] = "Site not confirmed, please confirm the email, sent to #{site.admin_email} to proceed."
|
||||||
response["error"] = "SITE_NOT_CONFIRMED"
|
response["error"] = "SITE_NOT_CONFIRMED"
|
||||||
elsif !site.access_granted
|
elsif !site.access_granted
|
||||||
response["message"] = "Store permissions reovked."
|
response["message"] = "Store permissions revoked."
|
||||||
response["error"] = "SITE_PERMISSION_DENIED"
|
response["error"] = "SITE_PERMISSION_DENIED"
|
||||||
else
|
else
|
||||||
response["success"] = true
|
response["success"] = true
|
||||||
|
@ -72,6 +72,7 @@ class Admin::RegisterApiController < ApplicationController
|
||||||
request = Net::HTTP::Post.new("/store/confirmation")
|
request = Net::HTTP::Post.new("/store/confirmation")
|
||||||
request.body = params_to_send.to_query
|
request.body = params_to_send.to_query
|
||||||
response = http.request(request)
|
response = http.request(request)
|
||||||
|
return response
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirm_email
|
def confirm_email
|
||||||
|
|
|
@ -15,6 +15,7 @@ class RegisteredSite
|
||||||
|
|
||||||
has_many :site_logs
|
has_many :site_logs
|
||||||
has_many :installed_modules
|
has_many :installed_modules
|
||||||
|
has_many :tickets
|
||||||
|
|
||||||
index({ confirmation_token: 1}, { unique: true })
|
index({ confirmation_token: 1}, { unique: true })
|
||||||
scope :active, ->{where(:access_granted => true,:site_confirmed => true)}
|
scope :active, ->{where(:access_granted => true,:site_confirmed => true)}
|
||||||
|
|
Loading…
Reference in New Issue