This commit is contained in:
parent
f0269a05fe
commit
cf492be360
@ -121,7 +121,7 @@ async fn data_handler(
|
|||||||
&state.config.local_oss,
|
&state.config.local_oss,
|
||||||
&segments.collect::<Vec<&str>>(),
|
&segments.collect::<Vec<&str>>(),
|
||||||
) {
|
) {
|
||||||
Ok(url) => url.replace(".png", "_processed.png"),
|
Ok(url) => url,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
return (
|
return (
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
@ -131,6 +131,7 @@ async fn data_handler(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
println!("url: {}", url);
|
||||||
match download_image(&url).await {
|
match download_image(&url).await {
|
||||||
Ok((image_data, content_type)) => {
|
Ok((image_data, content_type)) => {
|
||||||
// 缓存图像数据
|
// 缓存图像数据
|
||||||
@ -176,7 +177,7 @@ async fn data_handler(
|
|||||||
|
|
||||||
async fn data_nearest_handler(
|
async fn data_nearest_handler(
|
||||||
Query(params): Query<TileInfo>,
|
Query(params): Query<TileInfo>,
|
||||||
State(mut state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
) -> impl IntoResponse {
|
) -> impl IntoResponse {
|
||||||
match chrono::NaiveDateTime::parse_from_str(¶ms.datetime, "%Y%m%d%H%M%S") {
|
match chrono::NaiveDateTime::parse_from_str(¶ms.datetime, "%Y%m%d%H%M%S") {
|
||||||
Ok(naive_datetime) => {
|
Ok(naive_datetime) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user