From 0e8f59c16fcb21301c736ecbc4424cb4c5388c42 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 29 Feb 2016 19:42:08 +0100 Subject: Refactoring Grape API methods into normal controllers & other things --- config/routes.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'config/routes.rb') diff --git a/config/routes.rb b/config/routes.rb index 72cfd3e3e..7dd71ec46 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,12 +2,15 @@ Rails.application.routes.draw do get '.well-known/host-meta', to: 'xrd#host_meta', as: :host_meta get '.well-known/webfinger', to: 'xrd#webfinger', as: :webfinger - get 'atom/entries/:id', to: 'atom#entry', as: :atom_entry - get 'atom/users/:id', to: 'atom#user_stream', as: :atom_user_stream - get 'users/:name', to: 'profile#show', as: :profile - get 'users/:name/:id', to: 'profile#entry', as: :status + resources :accounts, path: 'users', only: [:show], param: :username do + resources :stream_entries, path: 'updates', only: [:show] + end - mount Mastodon::API => '/api/' + namespace :api do + resources :subscriptions, only: [:show] + post '/subscriptions/:id', to: 'subscriptions#update' + post '/salmon/:id', to: 'salmon#update', as: :salmon + end root 'home#index' end -- cgit