moved all data access layer code into a new selene.data package
parent
aac78cfdbe
commit
0b28b18b39
|
@ -1,6 +1,6 @@
|
|||
from selene.api import SeleneEndpoint
|
||||
|
||||
from selene.device import get_device_by_id
|
||||
from selene.data.device import get_device_by_id
|
||||
from selene.util.db import get_db_connection
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from selene.api import SeleneEndpoint
|
||||
from selene.device.repository.setting import get_device_settings
|
||||
from selene.data.device.repository import get_device_settings
|
||||
from selene.util.db import get_db_connection
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from selene.api import SeleneEndpoint
|
||||
from selene.skill.repository.skill import get_skill_settings_by_device_id_and_version_hash
|
||||
from selene.data.skill.repository.skill import get_skill_settings_by_device_id_and_version_hash
|
||||
from selene.util.db import get_db_connection
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from selene.api import SeleneEndpoint
|
||||
|
||||
from selene.skill.repository.skill import get_skill_settings_by_device_id
|
||||
from selene.data.skill.repository.skill import get_skill_settings_by_device_id
|
||||
from selene.util.db import get_db_connection
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from selene.api import SeleneEndpoint
|
||||
from selene.device.repository.device import get_subscription_type_by_device_id
|
||||
from selene.data.device.repository import get_subscription_type_by_device_id
|
||||
from selene.util.db import get_db_connection
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ authentication, which uses a 3rd party authentication, like Google.
|
|||
from binascii import a2b_base64
|
||||
from http import HTTPStatus
|
||||
|
||||
from selene.account import Account, AccountRepository, RefreshTokenRepository
|
||||
from selene.data.account import Account, AccountRepository, RefreshTokenRepository
|
||||
from selene.api import SeleneEndpoint
|
||||
from selene.util.auth import AuthenticationError
|
||||
from selene.util.db import get_db_connection
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
from http import HTTPStatus
|
||||
from logging import getLogger
|
||||
|
||||
from selene.account import RefreshTokenRepository
|
||||
from selene.data.account import RefreshTokenRepository
|
||||
from selene.api import SeleneEndpoint
|
||||
from selene.util.db import get_db_connection
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ on our database and build JWTs for access and refresh.
|
|||
from http import HTTPStatus
|
||||
|
||||
from selene.api import SeleneEndpoint
|
||||
from selene.account import AccountRepository, RefreshTokenRepository
|
||||
from selene.data.account import AccountRepository, RefreshTokenRepository
|
||||
from selene.util.auth import AuthenticationError
|
||||
from selene.util.db import get_db_connection
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import os
|
|||
from behave import fixture, use_fixture
|
||||
|
||||
from sso_api.api import sso
|
||||
from selene.account import AccountRepository
|
||||
from selene.data.account import AccountRepository
|
||||
from selene.util.db import get_db_connection
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ from http import HTTPStatus
|
|||
from behave import given, then, when
|
||||
from hamcrest import assert_that, equal_to, has_item, is_not
|
||||
|
||||
from selene.account import RefreshTokenRepository
|
||||
from selene.data.account import RefreshTokenRepository
|
||||
from selene.api.testing import get_account, validate_token_cookies
|
||||
from selene.util.auth import AuthenticationTokenGenerator
|
||||
from selene.util.db import get_db_connection
|
||||
|
|
|
@ -5,7 +5,7 @@ from http import HTTPStatus
|
|||
from flask import after_this_request, current_app, request
|
||||
from flask_restful import Resource
|
||||
|
||||
from selene.account import Account, AccountRepository, RefreshTokenRepository
|
||||
from selene.data.account import Account, AccountRepository, RefreshTokenRepository
|
||||
from selene.util.auth import (
|
||||
AuthenticationError,
|
||||
AuthenticationTokenGenerator,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from hamcrest import assert_that, equal_to, has_item
|
||||
|
||||
from selene.account import Account, AccountRepository
|
||||
from selene.data.account import Account, AccountRepository
|
||||
from selene.util.db import get_db_connection
|
||||
|
||||
ACCESS_TOKEN_COOKIE_KEY = 'seleneAccess'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
|
||||
from selene.device.entity.text_to_speech import TextToSpeech
|
||||
from selene.device.entity.wake_word import WakeWord
|
||||
from selene.data.device.entity.text_to_speech import TextToSpeech
|
||||
from selene.data.device import WakeWord
|
||||
|
||||
|
||||
@dataclass
|
|
@ -1,7 +1,7 @@
|
|||
from os import path
|
||||
from typing import List
|
||||
|
||||
from selene.device.entity.device import Device
|
||||
from selene.data.device import Device
|
||||
from selene.util.db import DatabaseQuery, fetch
|
||||
|
||||
SQL_DIR = path.join(path.dirname(__file__), 'sql')
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
from selene.device.repository.device import get_device_by_id
|
||||
from selene.device.repository.device import get_devices_by_account_id
|
Loading…
Reference in New Issue