Squashed commit of the following:

commit 84ac271bbb
Author: lda <[email protected]>
Date:   Fri Nov 21 00:56:02 2025 +0700

    six

commit 723b232123
Author: lda <[email protected]>
Date:   Fri Nov 21 00:50:24 2025 +0700

    expose the files, fmt

    now i can see what macs my computer is

commit aab791eb5d
Author: lda <[email protected]>
Date:   Fri Nov 21 00:38:37 2025 +0700

    uh what

commit 1dc598b262
Author: lda <[email protected]>
Date:   Tue Oct 21 01:10:19 2025 +0700

    the commit of cherrypicking

    d7c34ee
This commit is contained in:
lda
2025-11-21 01:02:32 +07:00 Unverified
parent 4f7e7e1fdd
commit b0d0bbf015
14 changed files with 144 additions and 138 deletions
+2
View File
@@ -1,8 +1,10 @@
you should use block code to refence code, like so: you should use block code to refence code, like so:
```rust ```rust
hello_world!(println); hello_world!(println);
// indented lines // indented lines
``` ```
in the chat. Else it fucks up formatting. in the chat. Else it fucks up formatting.
We work towards clean, maintainable design. im not the best at this thing. We work towards clean, maintainable design. im not the best at this thing.
Generated
+1 -1
View File
@@ -1310,7 +1310,7 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]] [[package]]
name = "wakey" name = "wakey"
version = "0.1.5" version = "0.1.6"
dependencies = [ dependencies = [
"axum", "axum",
"axum-extra", "axum-extra",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "wakey" name = "wakey"
version = "0.1.5" version = "0.1.6"
edition = "2024" edition = "2024"
publish = ["gitea"] publish = ["gitea"]
+1 -1
View File
@@ -55,7 +55,7 @@ class RsAssetModule:
body = "\n".join(files + subs) body = "\n".join(files + subs)
return ( return (
f"pub mod {sanitize(self.folder.name).lower()} {{" * self.full f"pub mod {sanitize(self.folder.name).lower()} {{" * self.full
+ f"\n{indent(body, 4*self.full)}\n" + f"\n{indent(body, 4 * self.full)}\n"
+ self.full * "}" + self.full * "}"
) )
+12
View File
@@ -6,6 +6,7 @@ pub mod status;
pub mod wake; pub mod wake;
use crate::assets; use crate::assets;
use crate::dhcpparse::load_mac_name_cache;
use crate::route::api::ip; use crate::route::api::ip;
use crate::route::api::status_redirect; use crate::route::api::status_redirect;
use crate::route::api::status_smart_redirect; use crate::route::api::status_smart_redirect;
@@ -14,6 +15,8 @@ use crate::route::dhcp::get_dhcp_leases;
use crate::route::status::get_status_json; use crate::route::status::get_status_json;
use crate::route::wake::wake_multi; use crate::route::wake::wake_multi;
use axum::Json;
use axum::response::IntoResponse;
use axum::routing::post; use axum::routing::post;
use axum::{Router, http::header, response::Html, routing::get}; use axum::{Router, http::header, response::Html, routing::get};
@@ -57,4 +60,13 @@ pub fn api_router() -> Router {
.route("/devs", get(devs_router)) .route("/devs", get(devs_router))
.route("/wake", post(wake_multi)) .route("/wake", post(wake_multi))
.route("/ips/{name}", get(ip)) .route("/ips/{name}", get(ip))
.route(
"/mac-cache",
get(|| async {
match load_mac_name_cache().await {
Ok(h) => Json(h).into_response(),
Err(e) => e.to_string().into_response(),
}
}),
)
} }
-8
View File
@@ -47,14 +47,6 @@ pub struct Filters {
pub macs: Vec<MacAddr>, pub macs: Vec<MacAddr>,
} }
#[deprecated = "use ApiError"]
#[skip_serializing_none]
#[derive(Debug, Serialize, Default)]
pub struct StatusError {
pub name: Option<String>,
pub error: String,
}
pub async fn get_status_json( pub async fn get_status_json(
Query(DeviceQuery { Query(DeviceQuery {
name, name,