Skip to content

Commit

Permalink
context modified action fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
a4arpon committed Nov 17, 2024
1 parent db500b7 commit bb4e108
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
run: bun run build

- name: Publish package
run: bunx jsr publish --allow-dirty --allow-slow-types
run: bunx jsr publish --allow-dirty
9 changes: 2 additions & 7 deletions src/hot-shot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ import { createMiddleware } from "hono/factory"
import { HTTPException } from "hono/http-exception"
import type { StatusCode } from "hono/utils/http-status"

declare module "hono" {
interface Context {
permissions?: RoutePermissions;
}
}

/*
|
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -388,7 +382,8 @@ export function middlewareFactory(
class PermissionController {
constructor(private requiredPermissions: RoutePermissions) {}

use = createMiddleware(async (ctx: Context, next: Next) => {
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
use = createMiddleware(async (ctx: any, next: Next) => {
try {
const myPermissions = ctx.permissions ?? []

Expand Down

0 comments on commit bb4e108

Please sign in to comment.