Skip to content
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

Merged
merged 4 commits into from
Mar 22, 2023

Conversation

finnar-bin
Copy link
Contributor

Closes #1934

simplescreenrecorder-2023-03-21_16.56.12.mp4

@finnar-bin finnar-bin self-assigned this Mar 21, 2023
@@ -319,3 +319,20 @@ export interface InstanceSetting {
createdAt: string;
updatedAt: string;
}

export interface ContentModelItem {
Copy link
Contributor

@agalin920 agalin920 Mar 21, 2023

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

Copy link
Contributor Author

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.

ZUID: string;
zid: number;
masterZUID: string;
ZUID?: string;
Copy link
Contributor

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

Copy link
Contributor Author

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

@shrunyan shrunyan merged commit 9d5613f into master Mar 22, 2023
@shrunyan shrunyan deleted the fix/1934-navigation-text-blank branch March 22, 2023 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants