site store confirmation enabled
This commit is contained in:
parent
1afcd7b289
commit
d853cb9f63
|
@ -0,0 +1,13 @@
|
|||
class StoreConfirmationController < ApplicationController
|
||||
|
||||
def confirm
|
||||
if params[:site_token]
|
||||
site = Site.first
|
||||
site.confirm_store(params[:site_token])
|
||||
render :json => {"success" => "true"}
|
||||
else
|
||||
render :json => {"success" => "false"}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -56,6 +56,13 @@ class Site
|
|||
|
||||
index({ access_token: 1}, { unique: true })
|
||||
|
||||
def confirm_store(site_token)
|
||||
if self.site_token.eql?(site_token)
|
||||
self.store_confirmation = true
|
||||
self.save
|
||||
end
|
||||
end
|
||||
|
||||
def minimum_enabled_locales
|
||||
size = self.in_use_locales.length
|
||||
if size < 1
|
||||
|
|
|
@ -359,6 +359,8 @@ Orbit::Application.routes.draw do
|
|||
match "/facebook/profile_import" => "facebook#profile_import"
|
||||
match "/desktop/wallpaper_upload" => "desktop#wallpaper_upload"
|
||||
|
||||
match "/store_confirmation/confirm" => "store_confirmation#confirm"
|
||||
|
||||
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#create_journal'
|
||||
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal'
|
||||
# match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal'
|
||||
|
|
Loading…
Reference in New Issue