Remove echo

This commit is contained in:
Lett Osprey 2026-04-15 22:02:24 +02:00
parent 20f37abbfd
commit 1012967129
3 changed files with 0 additions and 32 deletions

View file

@ -83,7 +83,6 @@ fn serve_static(filename: String) {
let data =
mist.send_file(path, offset: 0, limit: None)
|> result.map(fn(file) {
echo "SUCCESS " <> filename
response.new(200)
|> response.set_header("Content-Type", case surname {
Ok("css") -> "text/css"
@ -93,13 +92,11 @@ fn serve_static(filename: String) {
|> response.set_body(file)
})
|> result.lazy_unwrap(fn() {
echo "FAIL " <> filename
response.new(404)
|> response.set_body(
bytes_tree.from_string("Requested resource not found") |> mist.Bytes,
)
})
echo "Attempting to serve file " <> filename <> " was "
data
}

View file

@ -50,12 +50,6 @@ fn handle_api(
case list.key_find(req.headers, "x-api-key") {
Ok(key) -> {
echo "key" <> key
echo "enc key "
<> string.lowercase(
bit_array.base16_encode(crypto.hash(crypto.Sha256, <<key:utf8>>)),
)
echo "sha" <> sha_api_key
case
string.lowercase(
bit_array.base16_encode(crypto.hash(crypto.Sha256, <<key:utf8>>)),