-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix: Automatically create initial content item during model creation #1940
Conversation
src/shell/services/types.ts
Outdated
@@ -319,3 +319,20 @@ export interface InstanceSetting { | |||
createdAt: string; | |||
updatedAt: string; | |||
} | |||
|
|||
export interface ContentModelItem { |
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.
Im pretty sure we have typed this before. Look at ContentItem
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.
Ah yeah I somehow missed that yesterday, I've made some modifications on that type since during content creation I can only provide a few of those for the body so I made some optional.
src/shell/services/types.ts
Outdated
ZUID: string; | ||
zid: number; | ||
masterZUID: string; | ||
ZUID?: string; |
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.
@theofficialnar A content item will always have a zuid so I'm hesitant making this optional (along a lot of the other fields) since it can lead to some misunderstanding. the better thing to do is to make what you need as a payload better defined using the Partial utility
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 went ahead and reverted the changes to ContentItem type and just updated the payload body type to use Partials for Web and Meta
Closes #1934
simplescreenrecorder-2023-03-21_16.56.12.mp4