This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/data/model/message.py

12 lines
292 B
Python
Raw Normal View History

from data.database import Messages
def get_messages():
messages = []
for message in Messages.select():
messages.append({'id': message.id, 'content': message.content})
return messages
def create(messages):
for message in messages:
Messages.create(content=message['content'])