refactor: random fixes and usage improvements

This commit is contained in:
2025-02-17 17:01:23 -05:00
parent 8f2fbf11da
commit dde489a8ed
15 changed files with 203 additions and 90 deletions

View File

@@ -24,8 +24,8 @@ pub async fn serve(
let bytes = request.into_body().collect().await?.to_bytes();
match std::str::from_utf8(&bytes) {
Ok(code) => Response::new(full(match path.as_str() {
"/eval" => format!("{:?}", eval(&state.lua, code).await),
"/exec" => format!("{:?}", exec(&state.lua, code).await),
"/eval" => format!("{:#?}", eval(&state.lua, code).await),
"/exec" => format!("{:#?}", exec(&state.lua, code).await),
_ => unreachable!(),
})),
Err(error) => status_code_response(