-
Notifications
You must be signed in to change notification settings - Fork 3
feat: event support #380
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
feat: event support #380
Conversation
{ | ||
const query = { creatorId: { EQUALS: creatorId } }; | ||
|
||
const data = database.findRecord(RECORD_TYPE, query) as Promise<DataModel>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should await the promise to be able to check the data itself
{ | ||
const query = { postId: { EQUALS: postId } }; | ||
|
||
const data = database.findRecord(RECORD_TYPE, query) as Promise<DataModel>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to await the promise to be able to check the value of data
type AggregatedData = Omit<DataModel, 'email' | 'portraitId'> & | ||
{ | ||
readonly portrait?: ImageData; | ||
metrics: metricsData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readonly
|
||
import { Types } from '../definitions'; | ||
|
||
import getPost from '^/domain/post/getById'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import should be first
{ | ||
constructor() | ||
{ | ||
super('Creator metrics not found'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post metrics?
import type { AggregatedData as AggregatedReactionData } from '^/domain/reaction/aggregate'; | ||
import createComicReaction from '^/domain/reaction/createWithComic'; | ||
import getReaction from '^/domain/reaction/getByIdAggregated'; | ||
import createComicReaction from '^/domain/post/createWithComic'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be createComicPost
?
import type { AggregatedData as AggregatedReactionData } from '^/domain/reaction/aggregate'; | ||
import createCommentReaction from '^/domain/reaction/createWithComment'; | ||
import getReaction from '^/domain/reaction/getByIdAggregated'; | ||
import createCommentReaction from '^/domain/post/createWithComment'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be createCommentPost
?
import { useNavigate } from 'react-router-dom'; | ||
|
||
import { Types } from '^/domain/notification'; | ||
import type { AggregatedData as NotificationView } from '^/domain/notification/aggregate/types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AggregatedNotificationData
{ | ||
const navigate = useNavigate(); | ||
|
||
return useCallback((notification: NotificationView) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AggregatedNotificationData
import { beforeEach, describe, expect, it } from 'vitest'; | ||
|
||
import getAllAggregated from '^/domain/post/getAllAggregated'; | ||
import getAllAggregated from '^/domain/post/getRecommendedAggregated'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getRecommendedAggregated
|
Fixes #373
Fixes #370
Changes proposed in this pull request:
@MaskingTechnology/comify