Skip to content

Commit 915c4bf

Browse files
committed
fix: update the mock API
Signed-off-by: Rustin170506 <[email protected]>
1 parent f29093c commit 915c4bf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mirage/route-handlers/crates.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ export function register(server) {
271271
return notFound();
272272
}
273273

274+
const version = schema.versions.findBy({ crateId: crate.id, num: versionNum });
275+
if (!version) {
276+
return notFound();
277+
}
278+
274279
return {};
275280
});
276281

0 commit comments

Comments
 (0)