-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #780 from OpenSourceBrain/release/0.7.3
Release/0.7.3
- Loading branch information
Showing
250 changed files
with
6,423 additions
and
8,664 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
applications/accounts-api/backend/accounts_api/controllers/groups_controller.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import connexion | ||
import six | ||
from typing import Dict | ||
from typing import Tuple | ||
from typing import Union | ||
|
||
from accounts_api.models.group import Group # noqa: E501 | ||
from accounts_api.models.user import User # noqa: E501 | ||
from accounts_api import util | ||
|
||
from accounts_api.services import group_service | ||
|
||
def get_group(groupname): # noqa: E501 | ||
"""get_group | ||
# noqa: E501 | ||
:param groupname: | ||
:type groupname: str | ||
:rtype: Union[Group, Tuple[Group, int], Tuple[Group, int, Dict[str, str]] | ||
""" | ||
try: | ||
return group_service.get_group_by_name(groupname) | ||
except group_service.GroupNotFound as e: | ||
return "Group not found", 404 | ||
|
||
|
||
|
||
def get_group_users(groupname): # noqa: E501 | ||
"""get_group_users | ||
# noqa: E501 | ||
:param groupname: | ||
:type groupname: str | ||
:rtype: Union[Group, Tuple[Group, int], Tuple[Group, int, Dict[str, str]] | ||
""" | ||
try: | ||
return group_service.get_group_users(groupname) | ||
except group_service.GroupNotFound as e: | ||
return "Group not found", 404 | ||
|
||
|
||
def update_group(groupname, request_body): # noqa: E501 | ||
"""update_group | ||
# noqa: E501 | ||
:param groupname: | ||
:type groupname: str | ||
:param request_body: | ||
:type request_body: Dict[str, ] | ||
:rtype: Union[User, Tuple[User, int], Tuple[User, int, Dict[str, str]] | ||
""" | ||
return 'do some magic!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
applications/accounts-api/backend/accounts_api/models/get_users200_response.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# coding: utf-8 | ||
|
||
from __future__ import absolute_import | ||
from datetime import date, datetime # noqa: F401 | ||
|
||
from typing import List, Dict # noqa: F401 | ||
|
||
from accounts_api.models.base_model_ import Model | ||
from accounts_api.models.user import User | ||
from accounts_api import util | ||
|
||
from accounts_api.models.user import User # noqa: E501 | ||
|
||
class GetUsers200Response(Model): | ||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
Do not edit the class manually. | ||
""" | ||
|
||
def __init__(self, users=None): # noqa: E501 | ||
"""GetUsers200Response - a model defined in OpenAPI | ||
:param users: The users of this GetUsers200Response. # noqa: E501 | ||
:type users: List[User] | ||
""" | ||
self.openapi_types = { | ||
'users': List[User] | ||
} | ||
|
||
self.attribute_map = { | ||
'users': 'users' | ||
} | ||
|
||
self._users = users | ||
|
||
@classmethod | ||
def from_dict(cls, dikt) -> 'GetUsers200Response': | ||
"""Returns the dict as a model | ||
:param dikt: A dict. | ||
:type: dict | ||
:return: The get_users_200_response of this GetUsers200Response. # noqa: E501 | ||
:rtype: GetUsers200Response | ||
""" | ||
return util.deserialize_model(dikt, cls) | ||
|
||
@property | ||
def users(self): | ||
"""Gets the users of this GetUsers200Response. | ||
:return: The users of this GetUsers200Response. | ||
:rtype: List[User] | ||
""" | ||
return self._users | ||
|
||
@users.setter | ||
def users(self, users): | ||
"""Sets the users of this GetUsers200Response. | ||
:param users: The users of this GetUsers200Response. | ||
:type users: List[User] | ||
""" | ||
|
||
self._users = users |
Oops, something went wrong.