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/code snippet json api/request.ts #9505

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions packages/active-record/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ import { findRecord } from '@ember-data/active-record/request';

const options = findRecord('ember-developer', '1', { include: ['pets', 'friends'] });

/\*
/*
=> {
url: 'https://api.example.com/v1/ember_developers/1?include=friends,pets',
method: 'GET',
headers: <Headers>, // 'Content-Type': 'application/json;charset=utf-8'
op: 'findRecord';
records: [{ type: 'ember-developer', id: '1' }]
}
*\/
*\
MehulKChaudhari marked this conversation as resolved.
Show resolved Hide resolved
```

Request builder output may be used with either `requestManager.request` or `store.request`.
Expand Down
6 changes: 3 additions & 3 deletions packages/json-api/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import { findRecord } from '@ember-data/json-api/request';

const options = findRecord('ember-developer', '1', { include: ['pets', 'friends'] });

/\*
=> {
/*
{
url: 'https://api.example.com/v1/ember-developers/1?include=friends,pets',
method: 'GET',
headers: <Headers>,
Expand All @@ -41,7 +41,7 @@ const options = findRecord('ember-developer', '1', { include: ['pets', 'friends'
op: 'findRecord';
records: [{ type: 'ember-developer', id: '1' }]
}
*\/
*\
MehulKChaudhari marked this conversation as resolved.
Show resolved Hide resolved
MehulKChaudhari marked this conversation as resolved.
Show resolved Hide resolved
```

Request builder output may be used with either `requestManager.request` or `store.request`.
Expand Down
Loading