We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
read_only
1 parent e41f2a4 commit 606f918Copy full SHA for 606f918
src/controllers/site_metadata.rs
@@ -5,11 +5,15 @@ use super::prelude::*;
5
/// The sha is contained within the `HEROKU_SLUG_COMMIT` environment variable.
6
/// If `HEROKU_SLUG_COMMIT` is not set, returns `"unknown"`.
7
pub fn show_deployed_sha(req: &mut dyn RequestExt) -> EndpointResult {
8
+ let config = &req.app().config;
9
+ let read_only = config.db.are_all_read_only();
10
+
11
let deployed_sha =
12
dotenv::var("HEROKU_SLUG_COMMIT").unwrap_or_else(|_| String::from("unknown"));
13
14
Ok(req.json(&json!({
15
"deployed_sha": &deployed_sha[..],
16
"commit": &deployed_sha[..],
17
+ "read_only": read_only,
18
})))
19
}
0 commit comments