如何删除集合类型?
How to delete a Collection Type?
我在 Strapi 管理面板中创建了一个集合类型,现在我想将其删除,但我在管理面板的任何地方都看不到这样做的选项。我一定漏掉了一些明显的东西,对吧?
您可以在内容类型生成器中完成,步骤:
- 进入管理面板
- 内容类型生成器
- 单击集合类型
- 编辑(名字旁边的小笔图标)
- 删除
- 确认
Official docs - Deleting content-types
另一种方法是使用管理员 API,DELETE
调用:
/content-type-builder/content-types/:uid
要使用 API,您必须为 Roles & Permissions
下的角色启用权限
在此更新时,Strapi 添加了 caution(2022 年 2 月):
Deleting a content-type only deletes what was created and available from the Content-type Builder ... All the data ... is however kept in the database.
我在 Strapi 管理面板中创建了一个集合类型,现在我想将其删除,但我在管理面板的任何地方都看不到这样做的选项。我一定漏掉了一些明显的东西,对吧?
您可以在内容类型生成器中完成,步骤:
- 进入管理面板
- 内容类型生成器
- 单击集合类型
- 编辑(名字旁边的小笔图标)
- 删除
- 确认
Official docs - Deleting content-types
另一种方法是使用管理员 API,DELETE
调用:
/content-type-builder/content-types/:uid
要使用 API,您必须为 Roles & Permissions
在此更新时,Strapi 添加了 caution(2022 年 2 月):
Deleting a content-type only deletes what was created and available from the Content-type Builder ... All the data ... is however kept in the database.