code review, all authors query restored
This commit is contained in:
12
services/zine/authors.py
Normal file
12
services/zine/authors.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from base.orm import local_session
|
||||
from orm.user import User
|
||||
from orm.shout import ShoutAuthor
|
||||
|
||||
|
||||
class AuthorsStorage:
|
||||
@staticmethod
|
||||
async def get_all_authors():
|
||||
with local_session() as session:
|
||||
query = session.query(User).join(ShoutAuthor)
|
||||
result = query.all()
|
||||
return result
|
Reference in New Issue
Block a user