refactor: Use named exports for factories

This commit is contained in:
Faruk AYDIN
2023-10-23 10:36:44 +02:00
parent 655deb12c8
commit 6be8a581d2
12 changed files with 23 additions and 33 deletions

View File

@@ -5,7 +5,7 @@ type RoleParams = {
key?: string;
};
const createRole = async (params: RoleParams = {}): Promise<IRole> => {
export const createRole = async (params: RoleParams = {}): Promise<IRole> => {
params.name = params?.name || 'Viewer';
params.key = params?.key || 'viewer';
@@ -13,5 +13,3 @@ const createRole = async (params: RoleParams = {}): Promise<IRole> => {
return role;
};
export default createRole;