Skip to content

Commit 0c609c6

Browse files
committed
docs: Fix post detail fixture
1 parent 9cf4989 commit 0c609c6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

website/src/fixtures/posts.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ export class User extends Entity {
1313
return `https://i.pravatar.cc/64?img=${this.id + 4}`;
1414
}
1515

16-
pk() {
17-
return this.id;
18-
}
19-
2016
static key = 'User';
2117
}
2218
export const UserResource = resource({
@@ -32,10 +28,6 @@ export class Post extends Entity {
3228
body = '';
3329
votes = 0;
3430

35-
pk() {
36-
return this.id;
37-
}
38-
3931
static key = 'Post';
4032

4133
static schema = {
@@ -117,7 +109,7 @@ export const postFixtures = [
117109
{
118110
endpoint: PostResource.get,
119111
async response({ id }) {
120-
const author = UserResource.get({ id: entities[id].author });
112+
const author = await UserResource.get({ id: entities[id].author });
121113
return {
122114
id,
123115
votes: 0,

0 commit comments

Comments
 (0)