mirror of
https://ghfast.top/https://github.com/discourse/discourse-follow.git
synced 2026-07-15 11:36:38 +08:00
28 lines
678 B
Ruby
28 lines
678 B
Ruby
# frozen_string_literal: true
|
|
|
|
Follow::Engine.routes.draw do
|
|
put ":username" => "follow#follow",
|
|
:constraints => {
|
|
username: RouteFormat.username,
|
|
format: /(json|html)/,
|
|
},
|
|
:defaults => {
|
|
format: :json,
|
|
}
|
|
delete ":username" => "follow#unfollow",
|
|
:constraints => {
|
|
username: RouteFormat.username,
|
|
format: /(json|html)/,
|
|
},
|
|
:defaults => {
|
|
format: :json,
|
|
}
|
|
get "posts/:username" => "follow#posts",
|
|
:constraints => {
|
|
username: RouteFormat.username,
|
|
format: /(json|html)/,
|
|
},
|
|
:defaults => {
|
|
format: :json,
|
|
}
|
|
end
|