mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: prototype of local theme directory watcher
(note this will be documented a bit late)
This commit is contained in:
@@ -82,6 +82,13 @@ class Admin::ThemesController < Admin::AdminController
|
||||
rescue RuntimeError
|
||||
render_json_error I18n.t('themes.error_importing')
|
||||
end
|
||||
elsif params[:bundle]
|
||||
begin
|
||||
@theme = RemoteTheme.update_tgz_theme(params[:bundle].path, user: current_user)
|
||||
render json: @theme, status: :created
|
||||
rescue RuntimeError
|
||||
render_json_error I18n.t('themes.error_importing')
|
||||
end
|
||||
else
|
||||
render json: @theme.errors, status: :unprocessable_entity
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user