dev_local
daiao 6 years ago
parent 51865b6416
commit 5081ccc882

@ -62,9 +62,14 @@ module Mobile
end
def memo_authenticate!
if LocalSetting.first.try(:exam) && !current_user.admin?
redirect '/'
pass = (request.path.match(/memos\/\d+/).present? && !request.path.include?("reply")) ||
request.path.include?("get_memos_list") ||
request.path.include?("memos?page=") || request.path.match(/memos$/).present?
unless pass
error!('401 Unauthorized', 401) unless current_user
end
end
def discusses_authenticate!
@ -154,7 +159,6 @@ module Mobile
mount Apis::Sources
mount Apis::Careers
mount Apis::Assets
mount Apis::Ecloud

@ -1,19 +0,0 @@
# encoding=utf-8
module Mobile
module Apis
class Ecloud < Grape::API
# before {authenticate!}
content_type :json, 'application/json;charset=UTF-8'
resources :ecloud do
desc "ecloud接口测试"
post 'list' do
EcloudService.new.list(params)
end
end
end
end
end

@ -1,3 +0,0 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

@ -1,3 +0,0 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save