chore: add apps as option
This commit is contained in:
parent
80810d30a6
commit
56695fc2dd
@ -50,6 +50,9 @@ pub async fn cloud_req(reqname: &str,cloud: &Cloud,reqenv: &ReqEnv,opts: &KloudQ
|
|||||||
"liveness" => {
|
"liveness" => {
|
||||||
result.to_owned()
|
result.to_owned()
|
||||||
},
|
},
|
||||||
|
"apps" => {
|
||||||
|
result.to_owned()
|
||||||
|
},
|
||||||
_ => {
|
_ => {
|
||||||
result.to_owned()
|
result.to_owned()
|
||||||
}
|
}
|
||||||
@ -273,25 +276,26 @@ pub async fn status (
|
|||||||
prfx: String,
|
prfx: String,
|
||||||
// path: warp::path::FullPath, headers: warp::http::HeaderMap
|
// path: warp::path::FullPath, headers: warp::http::HeaderMap
|
||||||
) -> Result<impl Reply, Rejection> {
|
) -> Result<impl Reply, Rejection> {
|
||||||
// dbg!("{:#?}",&db);
|
// dbg!("{:#?}",&db);
|
||||||
// dbg!("{:#?}",&header);
|
// dbg!("{:#?}",&header);
|
||||||
// dbg!("{:#?}",&opts);
|
// dbg!("{:#?}",&opts);
|
||||||
let reqenv = ReqEnv::new(db.app, db.auth, header, method, "/status", "status", &prfx);
|
let reqenv = ReqEnv::new(db.app, db.auth, header, method, "/status", "status", &prfx);
|
||||||
// if let Some(lang_str) = header.get("accept-language") {
|
// if let Some(lang_str) = header.get("accept-language") {
|
||||||
// println!("{:?}",&lang_str);
|
// println!("{:?}",&lang_str);
|
||||||
// }
|
// }
|
||||||
// println!("User: {} | {}",&user.user_id,&user.token);
|
// println!("User: {} | {}",&user.user_id,&user.token);
|
||||||
|
|
||||||
|
println!("Status prfx: {}",&prfx);
|
||||||
// println!("LANG: {}",language);
|
// println!("LANG: {}",language);
|
||||||
// if prfx.as_str() == "prfl" {
|
// if prfx.as_str() == "prfl" {
|
||||||
// let cur = db.colls.ta.entries.read();
|
// let cur = db.colls.ta.entries.read();
|
||||||
// }
|
// }
|
||||||
// let allow_origin = reqenv.websrvr().allow_origin;
|
// let allow_origin = reqenv.websrvr().allow_origin;
|
||||||
// let result = cloud_req("status",&cloud,&reqenv,&opts).await;
|
// let result = cloud_req("status",&cloud,&reqenv,&opts).await;
|
||||||
// println!("Result: {}",&result);
|
// println!("Result: {}",&result);
|
||||||
// return Ok(warp::http::Response::builder()
|
// return Ok(warp::http::Response::builder()
|
||||||
// .body(result.to_string())
|
// .body(result.to_string())
|
||||||
// .into_response());
|
// .into_response());
|
||||||
match reqenv.user_authentication().await {
|
match reqenv.user_authentication().await {
|
||||||
Ok(_auth) => {
|
Ok(_auth) => {
|
||||||
// dbg!("auth: {}",&auth);
|
// dbg!("auth: {}",&auth);
|
||||||
|
Loading…
Reference in New Issue
Block a user