DG MS; added route for exported xml
This commit is contained in:
parent
7a3d168123
commit
8f1973815e
2 changed files with 8 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
require File.expand_path('../../../lib/diaspora/ostatus_builder', __FILE__)
|
require File.expand_path('../../../lib/diaspora/ostatus_builder', __FILE__)
|
||||||
|
require File.expand_path('../../../lib/diaspora/exporter', __FILE__)
|
||||||
|
|
||||||
before_filter :authenticate_user!, :except => [:new, :create, :public]
|
before_filter :authenticate_user!, :except => [:new, :create, :public]
|
||||||
|
|
||||||
|
|
@ -56,6 +57,11 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def export
|
||||||
|
exporter = Diaspora::Exporter.new(Diaspora::Exporters::XML)
|
||||||
|
render :xml => exporter.execute(current_user)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def prep_image_url(params)
|
def prep_image_url(params)
|
||||||
url = APP_CONFIG[:pod_url].chop if APP_CONFIG[:pod_url][-1,1] == '/'
|
url = APP_CONFIG[:pod_url].chop if APP_CONFIG[:pod_url][-1,1] == '/'
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ Diaspora::Application.routes.draw do
|
||||||
:password => "devise/passwords"}
|
:password => "devise/passwords"}
|
||||||
# added public route to user
|
# added public route to user
|
||||||
match 'public/:username', :to => 'users#public'
|
match 'public/:username', :to => 'users#public'
|
||||||
resources :users, :except => [:create, :new, :show]
|
match 'users/export', :to => 'users#export'
|
||||||
|
resources :users, :except => [:create, :new, :show]
|
||||||
|
|
||||||
match 'aspects/move_friends', :to => 'aspects#move_friends', :as => 'move_friends'
|
match 'aspects/move_friends', :to => 'aspects#move_friends', :as => 'move_friends'
|
||||||
match 'aspects/move_friend', :to => 'aspects#move_friend', :as => 'move_friend'
|
match 'aspects/move_friend', :to => 'aspects#move_friend', :as => 'move_friend'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue