mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2025-09-05 17:00:39 +00:00
add version in about page
This commit is contained in:
@@ -107,13 +107,19 @@ async fn delete(path: web::Path<NotePath>) -> impl Responder {
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct Status {
|
||||
version: String,
|
||||
max_size: usize,
|
||||
}
|
||||
|
||||
#[get("/status")]
|
||||
async fn status() -> impl Responder {
|
||||
println!("Limit: {}", *LIMIT);
|
||||
return HttpResponse::Ok().json(Status { max_size: *LIMIT });
|
||||
return HttpResponse::Ok().json(Status {
|
||||
version: option_env!("CARGO_PKG_VERSION")
|
||||
.unwrap_or("Unknown")
|
||||
.to_string(),
|
||||
max_size: *LIMIT,
|
||||
});
|
||||
}
|
||||
|
||||
pub fn init(cfg: &mut web::ServiceConfig) {
|
||||
|
Reference in New Issue
Block a user