Skip to content

Commit

Permalink
nothing just
Browse files Browse the repository at this point in the history
  • Loading branch information
pradeepbgs committed Jan 11, 2025
1 parent 9d5528e commit a3738ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
src/responseHandler.js
src/route.ts
node_modules
node_modules
route.ts
1 change: 0 additions & 1 deletion src/handleRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export default async function handleRequest(req: Request, server: Server, url: U
if (diesel.hasMiddleware) {
// first run global midl
const globalMiddleware = diesel.globalMiddlewares

for (let i = 0; i < globalMiddleware.length; i++) {
const result = await globalMiddleware[i](ctx, server);
if (result) return result;
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,8 @@ export default class Diesel {
this.addRoute("DELETE", path, handlers);
return this;
}
options(path: string, ...handlers: handlerFunction[]): this {
this.addRoute("OPTIONS", path, handlers);
return this;
}
}

0 comments on commit a3738ae

Please sign in to comment.