Commit c0307495 authored by 郑磊's avatar 郑磊

update

parent d85106c0
......@@ -19,26 +19,13 @@ def rome_add():
user_ids=form.user_ids.data
names=form.name.data
RoomId = ''.join([str(random.randint(0, 999)).zfill(3) for _ in range(2)])
if isinstance(user_ids,list):
token = create_token(names,'')
for name in range(len(user_ids)):
item = {}
token = GetToken(names,user_ids[name])
CreateRoom(token,user_ids[name],form.max_participants.data,form.empty_timeout.data,user_ids[name])
# item['Name']=names
item['RoomToken']=token
item['UserId']=user_ids[name]
token_list.append(item)
form.name.data=user_ids[name]
Room().set_attrs(form.data).direct_commit_()
else:
token = GetToken(names,user_ids)
item = {}
# item['Name'] = form.data.get('name')
item['RoomToken'] = token
item['UserId'] = user_ids
token_list.append(item)
CreateRoom(token,form.name.data,form.max_participants.data,form.empty_timeout.data,form.user_ids.data)
token = GetToken(names,user_ids)
item = {}
# item['Name'] = form.data.get('name')
item['RoomToken'] = token
item['UserId'] = user_ids
token_list.append(item)
CreateRoom(token,form.name.data,form.max_participants.data,form.empty_timeout.data,form.user_ids.data)
return result_format(code=200,sign=token,data=token_list,roomid=RoomId,name=names)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment