Skip to content

Commit 4127b8a

Browse files
committed
Reset password for application users
1 parent ebff603 commit 4127b8a

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

bugout/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
__email__ = "engineering@bugout.dev"
99
__license__ = "MIT"
10-
__version__ = "0.2.9"
10+
__version__ = "0.2.10"
1111

1212
__all__ = (
1313
"__author__",

bugout/app.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,13 @@ def confirm_email(
108108
return self.user.confirm_email(token=token, verification_code=verification_code)
109109

110110
def restore_password(
111-
self, email: str, timeout: float = REQUESTS_TIMEOUT
111+
self,
112+
email: str,
113+
application_id: Optional[Union[str, uuid.UUID]] = None,
114+
timeout: float = REQUESTS_TIMEOUT,
112115
) -> Dict[str, str]:
113116
self.user.timeout = timeout
114-
return self.user.restore_password(email=email)
117+
return self.user.restore_password(email=email, application_id=application_id)
115118

116119
def reset_password(
117120
self,

bugout/user.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,13 @@ def confirm_email(
114114
)
115115
return BugoutUser(**result)
116116

117-
def restore_password(self, email: str) -> Dict[str, str]:
117+
def restore_password(
118+
self, email: str, application_id: Optional[Union[str, uuid.UUID]] = None
119+
) -> Dict[str, str]:
118120
restore_password_path = "password/restore"
119121
data = {
120122
"email": email,
123+
"application_id": application_id,
121124
}
122125
result = self._call(method=Method.post, path=restore_password_path, data=data)
123126
return result

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
packages=find_packages(),
3939
package_data={"bugout": ["py.typed"]},
4040
zip_safe=False,
41-
install_requires=["pydantic>=1.6", "requests"],
41+
install_requires=["pydantic<=1.10.2", "requests"],
4242
extras_require={
4343
"dev": ["black", "mypy", "types-requests"],
4444
"distribute": ["setuptools", "twine", "wheel"],

0 commit comments

Comments
 (0)