guoren/config/routes.rb

36 lines
974 B
Ruby
Raw Normal View History

2016-12-22 20:00:08 +08:00
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
root 'login#init'
get '/login', to: 'login#init'
post '/login', to: 'login#login'
get 'logout', to: 'login#logout'
get '/signup', to: 'users#new'
2016-12-27 17:45:57 +08:00
get '/profile', to: 'users#edit'
2017-01-02 22:57:19 +08:00
get '/forgetpasswd', to: 'users#forgetpasswd'
get '/changepasswd', to: 'users#changepasswd'
post '/changepasswd', to: 'users#changepasswd'
2016-12-22 20:00:08 +08:00
get '/main', to: 'main#show'
2016-12-27 17:45:57 +08:00
get '/activity', to: 'main#activity'
2016-12-22 20:00:08 +08:00
get '/chat', to: 'chat#index'
post '/newmsg', to: 'chat#new'
get '/notify', to: 'chat#notify'
get '/query', to: 'chat#query'
2016-12-22 20:05:38 +08:00
get '/online', to: 'chat#online'
get '/microposts', to: 'micro_posts#show'
2016-12-27 17:45:57 +08:00
post '/newpost', to: 'micro_posts#new'
get '/deletepost', to: 'micro_posts#delete'
2016-12-22 20:05:38 +08:00
get '/comments', to: 'comments#get'
post '/newcomment', to: 'comments#new'
2016-12-22 20:00:08 +08:00
resource :users
2016-12-22 20:05:38 +08:00
resource :micro_posts
2016-12-22 20:00:08 +08:00
end