Add server and client build versions
This commit is contained in:
@@ -183,6 +183,7 @@ async fn graphql_request(
|
||||
request.execute(schema.inner()).await
|
||||
}
|
||||
|
||||
|
||||
#[rocket::main]
|
||||
async fn main() -> Result<(), Box<dyn Error>> {
|
||||
glog::new()
|
||||
@@ -193,6 +194,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
..Default::default()
|
||||
})
|
||||
.unwrap();
|
||||
build_info::build_info!(fn bi);
|
||||
info!("Build Info: {}", shared::build_version(bi));
|
||||
let allowed_origins = AllowedOrigins::all();
|
||||
let cors = rocket_cors::CorsOptions {
|
||||
allowed_origins,
|
||||
|
||||
@@ -229,6 +229,10 @@ struct SearchCursor {
|
||||
pub struct QueryRoot;
|
||||
#[Object]
|
||||
impl QueryRoot {
|
||||
async fn version<'ctx>(&self, _ctx: &Context<'ctx>) -> Result<String, Error> {
|
||||
build_info::build_info!(fn bi);
|
||||
Ok(shared::build_version(bi))
|
||||
}
|
||||
async fn count<'ctx>(&self, ctx: &Context<'ctx>, query: String) -> Result<usize, Error> {
|
||||
let nm = ctx.data_unchecked::<Notmuch>();
|
||||
let pool = ctx.data_unchecked::<PgPool>();
|
||||
|
||||
Reference in New Issue
Block a user