base for module testing
This commit is contained in:
parent
68d5a4aa20
commit
fe27f51ebb
1 changed files with 10 additions and 2 deletions
|
|
@ -121,12 +121,20 @@ async def register_user(userData: User):
|
||||||
# Get gateway interface
|
# Get gateway interface
|
||||||
appInterface = getInterface()
|
appInterface = getInterface()
|
||||||
|
|
||||||
# Create user
|
# Get default mandate ID
|
||||||
|
defaultMandateId = appInterface.getInitialId("mandates")
|
||||||
|
if not defaultMandateId:
|
||||||
|
raise HTTPException(
|
||||||
|
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||||
|
detail="No default mandate found"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create user with default mandate
|
||||||
user = appInterface.createUser(
|
user = appInterface.createUser(
|
||||||
username=userData.username,
|
username=userData.username,
|
||||||
password=userData.password,
|
password=userData.password,
|
||||||
email=userData.email,
|
email=userData.email,
|
||||||
mandateId=userData.mandateId,
|
mandateId=defaultMandateId, # Use default mandate instead of userData.mandateId
|
||||||
authenticationAuthority=AuthAuthority.LOCAL
|
authenticationAuthority=AuthAuthority.LOCAL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue