Formatting.

This commit is contained in:
2025-01-25 22:28:33 +01:00
parent b4f9ff2c62
commit f25feeeca3
21 changed files with 219 additions and 164 deletions
+4 -2
View File
@@ -17,13 +17,15 @@ class UserService(BaseService):
if await self.exists(username=username):
raise Exception("User already exists.")
model = await self.new()
model['nick'] = username
model["nick"] = username
model.email.value = email
model.username.value = username
model.password.value = await security.hash(password)
if await self.save(model):
if model:
channel = await self.services.channel.ensure_public_channel(model['uid'])
channel = await self.services.channel.ensure_public_channel(
model["uid"]
)
if not channel:
raise Exception("Failed to create public channel.")
return model