Skip to content

Commit

Permalink
Merge pull request #884 from jboolean/review-story-title
Browse files Browse the repository at this point in the history
Add story title to admin view
  • Loading branch information
jboolean authored Sep 16, 2023
2 parents 7bbe5dc + 14a2531 commit b1c404e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/src/api/stories/StoryApiModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface StoryApiModel {

type AdminFields = {
recaptchaScore: number;
title?: string;
};

// Can never be set by user
Expand Down
1 change: 1 addition & 0 deletions backend/src/api/stories/storyToApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function toAdminStoryResponse(story: Story): AdminStoryResponse {
'storytellerSubtitle'
),
textContent: story.textContent ?? undefined,
title: story.title ?? undefined,

recaptchaScore: story.recaptchaScore,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function StoryMetadataView({ story }: { story: AdminStory }): JSX.Element {
{story.photo}
</a>
</div>
<div>Title: {story.title}</div>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/screens/App/shared/types/Story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ export type StoryDraftRequest = {

export type AdminStory = Story & {
recaptchaScore: number;
title?: string;
};

0 comments on commit b1c404e

Please sign in to comment.