Start renaming
This commit is contained in:
@@ -55,7 +55,7 @@ export default define.middleware((ctx) => {
|
||||
Return different formats based on the `Accept` header:
|
||||
|
||||
```ts routes/api/users/[id].ts
|
||||
import { HttpError } from "fresh";
|
||||
import { HttpError } from "sweet";
|
||||
import { define } from "@/utils.ts";
|
||||
|
||||
export const handler = define.handlers({
|
||||
@@ -110,7 +110,7 @@ session example.
|
||||
Access URL search params from the context:
|
||||
|
||||
```ts routes/search.tsx
|
||||
import { page } from "fresh";
|
||||
import { page } from "sweet";
|
||||
import { define } from "@/utils.ts";
|
||||
|
||||
export const handler = define.handlers({
|
||||
@@ -141,7 +141,7 @@ export default define.middleware(async (ctx) => {
|
||||
Or set headers on a specific route using `page()`:
|
||||
|
||||
```ts
|
||||
import { page } from "fresh";
|
||||
import { page } from "sweet";
|
||||
|
||||
return page(data, {
|
||||
headers: { "Cache-Control": "public, max-age=3600" },
|
||||
|
||||
Reference in New Issue
Block a user