20 lines
		
	
	
		
			582 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			20 lines
		
	
	
		
			582 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
|  | import * as plugins from '../plugins.js'; | ||
|  | import * as paths from '../paths.js'; | ||
|  | import type { Cloudly } from '../classes.cloudly.js'; | ||
|  | 
 | ||
|  | export const getUsers = async (cloudlyRef: Cloudly) => { | ||
|  |   const users: plugins.servezoneInterfaces.data.IUser[] = []; | ||
|  |   const envAdminUser = await cloudlyRef.config.appData.waitForAndGetKey('servezoneAdminaccount'); | ||
|  |   if (envAdminUser) { | ||
|  |     users.push({ | ||
|  |       id: 'envadmin', | ||
|  |       data: { | ||
|  |         username: envAdminUser.split(':')[0], | ||
|  |         password: envAdminUser.split(':')[1], | ||
|  |         role: 'admin', | ||
|  |       }, | ||
|  |     }); | ||
|  |   } | ||
|  |   return users; | ||
|  | }; |