Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timonson committed Apr 30, 2024
1 parent 938e18b commit aecee8e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions middlewares/rpc.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import {
type AuthInput,
type Context,
isFunction,
type Methods,
type Options,
respond,
} from "./deps.ts";
import { verifyJwt } from "../functions/jwt.ts";

function addVerifyFunctions(authInput: AuthInput) {
const verify = isFunction(authInput.verification)
? authInput.verification
: verifyJwt(authInput.verification);
return { ...authInput, verification: verify };
const verification = authInput.verification;
return {
...authInput,
verification: typeof verification === "function"
? verification
: verifyJwt(verification),
};
}

export function rpcRespond(
Expand Down

0 comments on commit aecee8e

Please sign in to comment.