Skip to content

Commit

Permalink
chore: sync notifications api rename projects to project
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfran committed Nov 7, 2023
1 parent 07648de commit f3f6e19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,7 @@ export class NotificationComponent {
}

public getStoryUrl(notification: NotificationType): string {
if (
notification.type === 'stories.status_change' ||
notification.type === 'stories.delete'
) {
return `/project/${notification.content.projects.id}/${notification.content.projects.slug}/stories/${notification.content.story.ref}`;
} else {
return `/project/${notification.content.project.id}/${notification.content.project.slug}/stories/${notification.content.story.ref}`;
}
return `/project/${notification.content.project.id}/${notification.content.project.slug}/stories/${notification.content.story.ref}`;
}

public markAsRead(event: MouseEvent, notification: NotificationType): void {
Expand Down
4 changes: 2 additions & 2 deletions javascript/libs/data/src/lib/notification.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface NotificationStoryStatusChange extends Notification {
type: 'stories.status_change';
content: {
story: Pick<Story, 'ref' | 'title'>;
projects: Pick<Project, 'id' | 'name' | 'slug'>;
project: Pick<Project, 'id' | 'name' | 'slug'>;
status: string;
changedBy: Pick<User, 'color' | 'username' | 'fullName'>;
};
Expand All @@ -62,7 +62,7 @@ export interface NotificationStoryDelete extends Notification {
type: 'stories.delete';
content: {
story: Pick<Story, 'ref' | 'title'>;
projects: Pick<Project, 'id' | 'name' | 'slug'>;
project: Pick<Project, 'id' | 'name' | 'slug'>;
deletedBy: Pick<User, 'color' | 'username' | 'fullName'>;
};
}
Expand Down

0 comments on commit f3f6e19

Please sign in to comment.