Formatting.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user