Skip to content

Commit

Permalink
useguards modifed ;FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
a4arpon committed Nov 25, 2024
1 parent d0b6ef6 commit 1835d7d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@a4arpon/hotshot",
"version": "0.7.1",
"version": "0.7.15",
"exports": "./src/hot-shot.ts",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@a4arpon/hotshot",
"version": "0.7.1",
"version": "0.7.15",
"module": "./build/main.js",
"type": "module",
"repository": "https://github.com/a4arpon/hot-shot.git",
Expand Down
4 changes: 2 additions & 2 deletions src/mods-contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ import type {Context, Next} from "hono";
import { HTTPException } from "hono/http-exception"
export class ${middlewareClassName} implements UseGuard {
async use(ctx: Context, next: Next) {
async use(ctx: Context) {
if (ctx.req.path === "/${middlewareName.toLowerCase()}-guard") {
throw new HTTPException(HTTPStatus.BadRequest, {
message: "You're hitting on a dummy route",
});
}
console.log("${middlewareClassName} Activated On", ctx.req.path);
await next();
return true;
}
}`
}
Expand Down

0 comments on commit 1835d7d

Please sign in to comment.