Class: Landable::Api::AccessTokensController
Constant Summary
Landable::ApiController::API_MEDIA_REGEX
Instance Method Summary
collapse
#api_media
Instance Method Details
#destroy ⇒ Object
28
29
30
31
32
33
34
|
# File 'app/controllers/landable/api/access_tokens_controller.rb', line 28
def destroy
token = find_own_access_token
token.destroy!
head :no_content
rescue ActiveRecord::RecordNotFound
head :unauthorized
end
|
#show ⇒ Object
8
9
10
|
# File 'app/controllers/landable/api/access_tokens_controller.rb', line 8
def show
respond_with find_own_access_token
end
|
#update ⇒ Object
21
22
23
24
25
26
|
# File 'app/controllers/landable/api/access_tokens_controller.rb', line 21
def update
token = find_own_access_token
token.refresh!
respond_with token
end
|