Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs highlights again #1744

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions docs/ts/tutorials/rest-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ CREATE TABLE url (
🥐 Next, go back to the `url/url.ts` file and import the `SQLDatabase` class from `encore.dev/storage/sqldb` module by modifying the imports to look like this:

```ts
HL url/url.ts 1:1
-- url/url.ts --
import { api } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
Expand All @@ -162,7 +161,7 @@ import { randomBytes } from "node:crypto";
🥐 Now, to define the database, create an instance of the `SQLDatabase` class in the `url` service:

```ts
HL url/url.ts 4:5
HL url/url.ts 4:6
-- url/url.ts --
import { api } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
Expand Down Expand Up @@ -193,7 +192,7 @@ export const shorten = api(
🥐 Lastly, update the `shorten` function to insert data into the database:

```ts
HL url/url.ts 21:24
HL url/url.ts 21:26
-- url/url.ts --
import { api } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
Expand Down Expand Up @@ -267,8 +266,8 @@ To complete our URL shortener API, let’s add the endpoint to retrieve a URL gi
🥐 Add this endpoint to `url/url.ts`:

```ts
HL url/url.ts 0:0
HL url/url.ts 29:39
HL url/url.ts 0:1
HL url/url.ts 29:40
-- url/url.ts --
import { api, APIError } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
Expand Down Expand Up @@ -352,7 +351,6 @@ $ npm i --save-dev vitest
🥐 Next we need to add a test script to our `package.json`:

```json
HL package.json 1:1
-- package.json --
"scripts": {
"test": "vitest"
Expand Down
Loading