Skip to content

Commit

Permalink
Merge pull request #169 from webiny/test-api-admin-extension
Browse files Browse the repository at this point in the history
docs: updated test AI plugin code, renamed the model
  • Loading branch information
swapnilmmane authored Dec 6, 2024
2 parents 2a7f302 + 682a341 commit 501128a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const DecorateContentEntryFormBind = useBind.createDecorator(baseHook =>
const { model } = useModel();

// Skip tracking for non-article models
if (model.modelId !== "article") {
if (model.modelId !== "article-smart-seo") {
return baseHook(params);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const SmartSeo = () => {
name={"askAi"}
before={"save"}
element={<GetSeoData />}
modelIds={["article"]}
modelIds={["article-smart-seo"]}
/>
);
};
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "test-plugin-ai-api",
"main": "src/index.ts",
"keywords": [
"webiny-extension",
"webiny-extension-type:api"
],
"version": "1.0.0",
"dependencies": {
"@webiny/api-headless-cms": "5.41.1"
}
"name": "test-plugin-ai-api",
"main": "src/index.ts",
"keywords": [
"webiny-extension",
"webiny-extension-type:api"
],
"version": "1.0.0",
"dependencies": {
"@webiny/api-headless-cms": "5.41.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ export const Article = () => {
return [
// Defines a new Ungrouped content models group.
createCmsModelPlugin({
name: "Article",
modelId: "article",
name: "Article - Smart SEO",
modelId: "article-smart-seo",
description: "Article content model for Smart SEO",
group: {
id: "673b06847c123c0002c9cfdc",
name: "Ungrouped AI 2"
},
group: {id: "", name: ""},
fields: [
createModelField({
fieldId: "content",
Expand Down

0 comments on commit 501128a

Please sign in to comment.