fix from-request-link

This commit is contained in:
thomaschen 2014-02-12 16:47:18 +08:00
parent fa47232ecf
commit b44d527b0a
2 changed files with 4 additions and 2 deletions

View File

@ -5,14 +5,15 @@ class Panel::Feed::BackEnd::FeedRequestsController < OrbitBackendController
open_for_visitor :only => [:transferred_request, :accepted_request] open_for_visitor :only => [:transferred_request, :accepted_request]
def transferred_request def transferred_request
binding.pry
if request.headers["HTTP_X_AUTH_TOKEN"] == '3kjlfksjDFJ' if request.headers["HTTP_X_AUTH_TOKEN"] == '3kjlfksjDFJ'
permission_feed = AnnouncementFeed.new( permission_feed = AnnouncementFeed.new(
link: params['link'], link: params['link'],
name: params['name'], name: params['name'],
categories: params['categories'].split, categories: params['categories'].split,
from_request: true, from_request: true,
from_request_link: request.host) from_request_link: params['from_host'])
permission_feed.save! permission_feed.save!
render :nothing => true render :nothing => true

View File

@ -122,6 +122,7 @@ class Panel::Feed::BackEnd::FeedsController < OrbitBackendController
body = { body = {
'link' => feed.link, 'link' => feed.link,
'name' => feed.name, 'name' => feed.name,
'from_host' => request.host,
'categories' => categories 'categories' => categories
} }