We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59d9789 commit e76e306Copy full SHA for e76e306
cornucopia.owasp.org/src/routes/api/cre/[edition]/+server.ts
@@ -4,8 +4,9 @@ import { CreController } from '$domain/cre/creController';
4
5
export const prerender = false;
6
7
-export const GET: RequestHandler = ({ params }) => {
8
- const edition = params.edition;
+export const GET: RequestHandler = ({ url }) => {
+ const params = url.pathname.split('/');
9
+ const edition = params[params.length - 1];
10
11
// V16.5: Fail securely by terminating handler on invalid edition
12
if (!edition || !DeckService.hasEdition(edition)) {
0 commit comments