Skip to content

Commit

Permalink
Merge pull request #1 from LynithDev/main
Browse files Browse the repository at this point in the history
  • Loading branch information
qewer33 authored Jan 30, 2024
2 parents 3f24161 + deea60e commit c510d3d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/target
**/*.rs.bk
wasm-pack.log
build/
build/
node_modules/
.wrangler/
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ impl UrlShortener {
return Response::from_html(html);
}
let html404 = include_str!("404.html");
return Response::from_html(html404);
return Response::from_html(html404).map(|res| {
res.with_status(404)
});
}
Response::error("Bad Request: Missing Parameter", 400)
}
Expand Down
2 changes: 1 addition & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kv_namespaces = [
]

[build]
command = "cargo install -q worker-build && worker-build --release" # required
command = "cargo install -q worker-build --version ^0.0.8 && worker-build --release" # required

[build.upload]
dir = "build/worker"
Expand Down

0 comments on commit c510d3d

Please sign in to comment.