mirror of
https://github.com/System-End/cdn.git
synced 2026-04-19 23:22:53 +00:00
22 lines
448 B
Ruby
22 lines
448 B
Ruby
# frozen_string_literal: true
|
|
|
|
module API
|
|
module V4
|
|
class APIKeysController < ApplicationController
|
|
def revoke
|
|
api_key = current_token
|
|
owner_email = current_user.email
|
|
key_name = api_key.name
|
|
|
|
api_key.revoke!
|
|
|
|
render json: {
|
|
success: true,
|
|
owner_email: owner_email,
|
|
key_name: key_name,
|
|
status: "complete"
|
|
}, status: :ok
|
|
end
|
|
end
|
|
end
|
|
end
|