Skip to content

Commit

Permalink
0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwiterrion committed Dec 12, 2023
1 parent 131b92d commit 87a6d54
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasmo"
version = "0.2.2"
version = "0.2.4"
edition = "2021"
authors = ["Zwiterrion <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wasmo",
"version": "0.2.2",
"version": "0.2.4",
"main": "index.js",
"license": "MIT",
"scripts": {
Expand Down
8 changes: 6 additions & 2 deletions server/routers/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ router.use((req, res, next) => {
});

router.get('/local/wasm/:id', (req, res) => {
FileSystem.getLocalWasm(`${req.params.id}.wasm`, res)
const id = req.params.id.endsWith('.wasm') ? req.params.id : `${req.params.id}.wasm`;

FileSystem.getLocalWasm(id, res);
})

function getWasm(wasmId, res) {
Datastore.getWasm(wasmId)
const id = wasmId.endsWith('.wasm') ? wasmId : `${wasmId}.wasm`;

Datastore.getWasm(id)
.then(({ content, error, status }) => {
if (error) {
res.status(status).json({ error, status })
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.2.2",
"version": "0.2.4",
"private": true,
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
Expand Down

0 comments on commit 87a6d54

Please sign in to comment.