mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 01:47:13 +00:00 
			
		
		
		
	 ac3d10006c
			
		
	
	
		ac3d10006c
		
			
		
	
	
	
	
		
			
			* add session option to mongo queries for transaction Signed-off-by: harimkims <harimkims@gmail.com> * seperate session parameter in buildQuery functions Signed-off-by: harimkims <harimkims@gmail.com> * clarify comment about mongoose create requirement Signed-off-by: harimkims <harimkims@gmail.com> Co-authored-by: Convly <jean-sebastien.herbaux@epitech.eu>
		
			
				
	
	
		
			14 lines
		
	
	
		
			345 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			345 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict';
 | |
| 
 | |
| const { createAgent } = require('./agent');
 | |
| const { superAdmin } = require('./strapi');
 | |
| 
 | |
| const createRequest = ({ strapi } = {}) => createAgent(strapi);
 | |
| const createAuthRequest = ({ strapi, userInfo = superAdmin.credentials }) =>
 | |
|   createAgent(strapi).login(userInfo);
 | |
| 
 | |
| module.exports = {
 | |
|   createRequest,
 | |
|   createAuthRequest,
 | |
| };
 |