Skip to content

Commit

Permalink
Minor fixes for issues from outlook testing (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecRosenbaum authored Oct 2, 2020
1 parent c689736 commit a4d313c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions inbox/api/srv.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from inbox.models import Account, Namespace
from inbox.models.backends.generic import GenericAccount
from inbox.models.backends.gmail import GOOGLE_EMAIL_SCOPE, GmailAccount
from inbox.models.backends.outlook import OutlookAccount
from inbox.models.secret import SecretType
from inbox.models.session import global_session_scope
from inbox.util.logging_helper import reconfigure_logging
Expand Down Expand Up @@ -277,6 +278,9 @@ def modify_account(namespace_public_id):
elif isinstance(account, GmailAccount):
auth_handler = GoogleAuthHandler()
account_data = _get_account_data_for_google_account(data)
elif isinstance(account, OutlookAccount):
auth_handler = MicrosoftAuthHandler()
account_data = _get_account_data_for_microsoft_account(data)
else:
raise ValueError("Account type not supported.")

Expand Down
2 changes: 1 addition & 1 deletion inbox/models/backends/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
Generic OAuth class that provides abstraction for access and
refresh tokens.
"""
import json
from datetime import datetime, timedelta

from nylas.logging import get_logger
from sqlalchemy import Column, ForeignKey
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import relationship

from inbox.basicauth import OAuthError
from inbox.models.secret import Secret, SecretType

log = get_logger()
Expand Down

0 comments on commit a4d313c

Please sign in to comment.