| |
@@ -63,8 +63,10 @@
|
| |
@apiv3_ns.route("/project/list", methods=GET)
|
| |
@pagination()
|
| |
@query_params()
|
| |
- def get_project_list(ownername, **kwargs):
|
| |
- if ownername.startswith("@"):
|
| |
+ def get_project_list(ownername=None, **kwargs):
|
| |
+ if not ownername:
|
| |
+ query = CoprsLogic.get_multiple()
|
| |
+ elif ownername.startswith("@"):
|
| |
group_name = ownername[1:]
|
| |
query = CoprsLogic.get_multiple()
|
| |
query = CoprsLogic.filter_by_group_name(query, group_name)
|
| |
Do not insist on
ownername
parameter forProjectProxy.get_list(...)
to have a possibility to query all projects (of all users).Usage:
It is an example with pagination, I wouldn't recommend anyone to query all projects in Copr without it.