Logo
Explore Help
Sign In
stevenoh0908/mastodon-sakyey
1
0
Fork 0
You've already forked mastodon-sakyey
Code Issues Packages Projects Releases Wiki Activity
Files
447cfef62d74a670ddd600c0240f41746ac2fe0a
mastodon-sakyey/app/controllers/api/follows_controller.rb

10 lines
224 B
Ruby
Raw Normal View History

Adding doorkeeper, adding a REST API POST /api/statuses Params: status (text contents), in_reply_to_id (optional) GET /api/statuses/:id POST /api/statuses/:id/reblog GET /api/accounts/:id GET /api/accounts/:id/following GET /api/accounts/:id/followers POST /api/accounts/:id/follow POST /api/accounts/:id/unfollow POST /api/follows Params: uri (e.g. user@domain) OAuth authentication is currently disabled, but the API can be used with HTTP Auth.
2016-03-07 12:42:33 +01:00
class Api::FollowsController < ApiController
Improving feed queries, switching API to doorkeeper authentication
2016-03-11 16:47:36 +01:00
before_action :doorkeeper_authorize!
Adding doorkeeper, adding a REST API POST /api/statuses Params: status (text contents), in_reply_to_id (optional) GET /api/statuses/:id POST /api/statuses/:id/reblog GET /api/accounts/:id GET /api/accounts/:id/following GET /api/accounts/:id/followers POST /api/accounts/:id/follow POST /api/accounts/:id/unfollow POST /api/follows Params: uri (e.g. user@domain) OAuth authentication is currently disabled, but the API can be used with HTTP Auth.
2016-03-07 12:42:33 +01:00
respond_to :json
def create
@follow = FollowService.new.(current_user.account, params[:uri])
render action: :show
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 21ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API