-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Resolve segment owner names and dates in site timezone in the BE #5119
Conversation
863994f
to
30a99fc
Compare
|
dc61813
to
06e782f
Compare
@@ -14,11 +14,24 @@ export type SavedSegment = { | |||
id: number | |||
name: string | |||
type: SegmentType | |||
owner_id: number | |||
/** null owner_id or owner_name signifies that the owner has been removed from the site */ | |||
owner_id: number | null |
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.
I don't have much experience with typescript types but would something like this be possible?
owner: {id: number, name: string} | null
?
This would disallow the following invalid state at the type level:
{
owner_id: 123,
owner_name: null
}
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.
True, that state is invalid and I've updated the type definitions to reflect that: 26b136a
Changes
Tests
Changelog
Documentation
Dark mode