| 
									
										
										
										
											2020-10-22 16:43:51 +02:00
										 |  |  | 'use strict'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const { prop } = require('lodash/fp'); | 
					
						
							| 
									
										
										
										
											2020-11-02 12:40:35 +01:00
										 |  |  | const wrapBadRequest = require('./wrap-bad-request'); | 
					
						
							| 
									
										
										
										
											2020-11-02 19:39:48 +01:00
										 |  |  | const pickWritableAttributes = require('./pick-writable-attributes'); | 
					
						
							| 
									
										
										
										
											2020-11-02 12:40:35 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | // retrieve a local service
 | 
					
						
							|  |  |  | const getService = name => { | 
					
						
							|  |  |  |   return prop(`content-manager.services.${name}`, strapi.plugins); | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2020-10-22 16:43:51 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | module.exports = { | 
					
						
							| 
									
										
										
										
											2020-11-02 12:40:35 +01:00
										 |  |  |   getService, | 
					
						
							|  |  |  |   wrapBadRequest, | 
					
						
							| 
									
										
										
										
											2020-11-02 19:39:48 +01:00
										 |  |  |   pickWritableAttributes, | 
					
						
							| 
									
										
										
										
											2020-10-22 16:43:51 +02:00
										 |  |  | }; |