21 lines
605 B
TypeScript
21 lines
605 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: {
|
|
type: 'human',
|
|
username: envAdminUser.split(':')[0],
|
|
password: envAdminUser.split(':')[1],
|
|
role: 'admin',
|
|
},
|
|
});
|
|
}
|
|
return users;
|
|
};
|