Skip to content

Commit aa956d7

Browse files
authored
🤖 Merge PR DefinitelyTyped#55014 [bitauth] Bugfix: bitauth middleware is already a function by @joshuaharry
1 parent f27567d commit aa956d7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎types/bitauth/bitauth-tests.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as bitauth from 'bitauth';
2+
import * as express from 'express';
23

34
const keys = bitauth.generateSin();
45

@@ -21,3 +22,6 @@ const password = 's4705hiru13z!';
2122

2223
const enc = bitauth.encrypt(password, secret);
2324
bitauth.decrypt(password, enc);
25+
26+
const app = express();
27+
app.use(bitauth.middleware);

‎types/bitauth/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ export function verifySignature(
3030
export function validateSin(sin: string, callback?: callback): boolean | void;
3131
export function encrypt(password: BinaryLike, str: string): string;
3232
export function decrypt(password: BinaryLike, str: string): string;
33-
export function middleware(): RequestHandler;
33+
export const middleware: RequestHandler;
3434

3535
export {};

0 commit comments

Comments
 (0)