Skip to content

isopruefi-frontend v1.0.0


isopruefi-frontend / utils/authApi / register

Function: register()

register(userName, password): Promise\<void>

Defined in: utils/authApi.ts:92

Registers a new user in the system. Requires admin privileges.

Parameters

userName

string

The desired username for the new user

password

string

The password for the new user

Returns

Promise\<void>

Promise that resolves on successful registration

Throws

When registration fails, username exists, or insufficient permissions

Example

try {
  await register('newuser@example.com', 'securePassword123');
  console.log('User registered successfully');
} catch (error) {
  console.error('Registration failed:', error);
}