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.
1 parent c044370 commit e636437Copy full SHA for e636437
src/controllers/site_metadata.rs
@@ -29,12 +29,12 @@ pub struct MetadataResponse<'a> {
29
pub async fn get_site_metadata(state: AppState) -> impl IntoResponse {
30
let read_only = state.config.db.are_all_read_only();
31
32
- let deployed_sha =
33
- dotenvy::var("HEROKU_SLUG_COMMIT").unwrap_or_else(|_| String::from("unknown"));
+ let deployed_sha = dotenvy::var("HEROKU_SLUG_COMMIT");
+ let deployed_sha = deployed_sha.as_deref().unwrap_or("unknown");
34
35
Json(MetadataResponse {
36
- deployed_sha: &deployed_sha,
37
- commit: &deployed_sha,
+ deployed_sha,
+ commit: deployed_sha,
38
read_only,
39
})
40
.into_response()
0 commit comments