mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 22:51:41 +00:00
fix: no fallar si no hay sitio del panel
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
679a3fde85
commit
504f30997e
2 changed files with 10 additions and 8 deletions
|
@ -5,6 +5,7 @@ class EnvController < ActionController::Base
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@site = Site.find_by_name('panel')
|
@site = Site.find_by_name('panel')
|
||||||
stale? @site
|
|
||||||
|
stale? @site if @site
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
15
app/views/env/index.js.haml
vendored
15
app/views/env/index.js.haml
vendored
|
@ -1,7 +1,8 @@
|
||||||
= cache @site do
|
- if @site
|
||||||
:plain
|
= cache @site do
|
||||||
window.env = {
|
:plain
|
||||||
AIRBRAKE_SITE_ID: #{@site.id},
|
window.env = {
|
||||||
AIRBRAKE_API_KEY: "#{@site.airbrake_api_key}",
|
AIRBRAKE_SITE_ID: #{@site.id},
|
||||||
PANEL_URL: "#{ENV['PANEL_URL']}"
|
AIRBRAKE_API_KEY: "#{@site.airbrake_api_key}",
|
||||||
}
|
PANEL_URL: "#{ENV['PANEL_URL']}"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue