mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
basic api support
This commit is contained in:
10
app/controllers/admin/api_controller.rb
Normal file
10
app/controllers/admin/api_controller.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class Admin::ApiController < Admin::AdminController
|
||||
def index
|
||||
render json: {key: SiteSetting.api_key}
|
||||
end
|
||||
|
||||
def generate_key
|
||||
SiteSetting.generate_api_key!
|
||||
render json: {key: SiteSetting.api_key}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user