Skip to content

Commit b0330a3

Browse files
committed
fix spacing
1 parent 9b69610 commit b0330a3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/content/changelog/durable-objects/2025-06-25-actors-package-alpha.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ export class ChatRoom extends DurableObject<Env> {
3232
sql: "CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY)"
3333
}]
3434
}
35-
async fetch(request: Request): Promise<Response> {
36-
// Run migrations before executing SQL query
37-
await this.storage.runMigrations();
35+
async fetch(request: Request): Promise<Response> {
36+
// Run migrations before executing SQL query
37+
await this.storage.runMigrations();
3838

39-
// Query with SQL template
40-
let userId = new URL(request.url).searchParams.get("userId");
41-
const query = this.storage.sql`SELECT * FROM users WHERE id = ${userId};`
42-
return new Response(`${JSON.stringify(query)}`);
39+
// Query with SQL template
40+
let userId = new URL(request.url).searchParams.get("userId");
41+
const query = this.storage.sql`SELECT * FROM users WHERE id = ${userId};`
42+
return new Response(`${JSON.stringify(query)}`);
4343
}
4444
}
4545
```
@@ -61,8 +61,8 @@ You can route to different Durable Objects by name within your `Actor` class usi
6161
```js
6262
export class MyActor extends Actor<Env> {
6363
static nameFromRequest(request: Request): string {
64-
let url = new URL(request.url);
65-
return url.searchParams.get("userId") ?? "foo";
64+
let url = new URL(request.url);
65+
return url.searchParams.get("userId") ?? "foo";
6666
}
6767

6868
async fetch(request: Request): Promise<Response> {

0 commit comments

Comments
 (0)