Skip to content

Commit

Permalink
docs: Fix post detail fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Aug 24, 2024
1 parent 9cf4989 commit 0c609c6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions website/src/fixtures/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ export class User extends Entity {
return `https://i.pravatar.cc/64?img=${this.id + 4}`;
}

pk() {
return this.id;
}

static key = 'User';
}
export const UserResource = resource({
Expand All @@ -32,10 +28,6 @@ export class Post extends Entity {
body = '';
votes = 0;

pk() {
return this.id;
}

static key = 'Post';

static schema = {
Expand Down Expand Up @@ -117,7 +109,7 @@ export const postFixtures = [
{
endpoint: PostResource.get,
async response({ id }) {
const author = UserResource.get({ id: entities[id].author });
const author = await UserResource.get({ id: entities[id].author });
return {
id,
votes: 0,
Expand Down

0 comments on commit 0c609c6

Please sign in to comment.