-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix [ERROR HANDLING] description on readme * Add PATCH and HEAD to app.all() * Hide RoutePathHandler.splitPathSegments * Fix RoutePathHandler.sanitizePath * Move tests to /test * Modify ci * Move deps.ts and dev_deps.ts to root directory * Update ci to cache deps
- Loading branch information
Showing
8 changed files
with
47 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
/// <reference path="https://deno.land/x/[email protected]/types/deploy.ns.d.ts" /> | ||
/// <reference path="https://deno.land/x/[email protected]/types/deploy.window.d.ts" /> | ||
|
||
import { brightRed, Status } from "./deps.ts"; | ||
import { brightRed, Status } from "../deps.ts"; | ||
import { KyukoRequest, KyukoRequestImpl } from "./KyukoRequest.ts"; | ||
import { KyukoResponse, KyukoResponseImpl } from "./KyukoResponse.ts"; | ||
import { RoutePathHandler } from "./RoutePathHandler.ts"; | ||
|
@@ -182,6 +182,8 @@ export class Kyuko { | |
this.#customHandlers.get("POST")?.set(routePath, handler); | ||
this.#customHandlers.get("PUT")?.set(routePath, handler); | ||
this.#customHandlers.get("DELETE")?.set(routePath, handler); | ||
this.#customHandlers.get("PATCH")?.set(routePath, handler); | ||
this.#customHandlers.get("HEAD")?.set(routePath, handler); | ||
} | ||
|
||
/** | ||
|
@@ -243,7 +245,7 @@ export class Kyuko { | |
}); | ||
|
||
// Fill req.path | ||
req.path = RoutePathHandler.splitPathSegments(pathname).join("/") || "/"; | ||
req.path = RoutePathHandler.sanitizePath(pathname); | ||
|
||
this.invokeHandlers(req, res, routeHandler); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
/// <reference path="https://deno.land/x/[email protected]/types/deploy.ns.d.ts" /> | ||
/// <reference path="https://deno.land/x/[email protected]/types/deploy.window.d.ts" /> | ||
|
||
import { Status, STATUS_TEXT } from "./deps.ts"; | ||
import { Status, STATUS_TEXT } from "../deps.ts"; | ||
|
||
/** | ||
* The response object that is handled in Kyuko applications. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters