update for tickets dependency

This commit is contained in:
Harry Bomrah 2015-08-19 13:28:50 +08:00
parent fc3529fb37
commit a1a24751e3
2 changed files with 3 additions and 1 deletions

View File

@ -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["error"] = "SITE_NOT_CONFIRMED"
elsif !site.access_granted
response["message"] = "Store permissions reovked."
response["message"] = "Store permissions revoked."
response["error"] = "SITE_PERMISSION_DENIED"
else
response["success"] = true
@ -72,6 +72,7 @@ class Admin::RegisterApiController < ApplicationController
request = Net::HTTP::Post.new("/store/confirmation")
request.body = params_to_send.to_query
response = http.request(request)
return response
end
def confirm_email

View File

@ -15,6 +15,7 @@ class RegisteredSite
has_many :site_logs
has_many :installed_modules
has_many :tickets
index({ confirmation_token: 1}, { unique: true })
scope :active, ->{where(:access_granted => true,:site_confirmed => true)}