mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 04:54:18 +00:00
🐛 GET requests can't have bodies
This commit is contained in:
parent
400909feb8
commit
4803a8db59
1 changed files with 2 additions and 2 deletions
|
@ -18,10 +18,10 @@ def page_repositories():
|
|||
if request.method == "GET":
|
||||
owner = Repository.query.filter_by(owner_id=user.email)
|
||||
spectator = Authorization.query.filter_by(email=user.email).join(Repository)
|
||||
if request.json.get("onlyActive"):
|
||||
if request.args.get("onlyActive"):
|
||||
owner = owner.filter_by(isActive=True)
|
||||
spectator = spectator.filter(Repository.isActive)
|
||||
elif request.json.get("onlyDead"):
|
||||
elif request.args.get("onlyDead"):
|
||||
owner = owner.filter_by(isActive=False)
|
||||
spectator = spectator.filter(not Repository.isActive)
|
||||
owner = owner.all()
|
||||
|
|
Loading…
Reference in a new issue