mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 09:56:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			272 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			272 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict';
 | |
| 
 | |
| const {
 | |
|   contentTypes: { hasDraftAndPublish },
 | |
| } = require('@strapi/utils');
 | |
| 
 | |
| module.exports = (ctx, config, { strapi }) => {
 | |
|   const { model: modelUID } = ctx.params;
 | |
| 
 | |
|   const model = strapi.contentTypes[modelUID];
 | |
| 
 | |
|   return hasDraftAndPublish(model);
 | |
| };
 | 
