change name rent resource for assigned
This commit is contained in:
parent
69368a8ca3
commit
64fe93491c
|
@ -14,7 +14,7 @@ from ereuse_devicehub.resources.device import definitions
|
||||||
from ereuse_devicehub.resources.documents import documents
|
from ereuse_devicehub.resources.documents import documents
|
||||||
from ereuse_devicehub.resources.enums import PriceSoftware
|
from ereuse_devicehub.resources.enums import PriceSoftware
|
||||||
from ereuse_devicehub.resources.versions import versions
|
from ereuse_devicehub.resources.versions import versions
|
||||||
from ereuse_devicehub.resources.rent import definitions as rent_def
|
from ereuse_devicehub.resources.assigned import definitions as assigned_def
|
||||||
|
|
||||||
|
|
||||||
class DevicehubConfig(Config):
|
class DevicehubConfig(Config):
|
||||||
|
@ -29,7 +29,7 @@ class DevicehubConfig(Config):
|
||||||
import_resource(documents),
|
import_resource(documents),
|
||||||
import_resource(inventory),
|
import_resource(inventory),
|
||||||
import_resource(versions),
|
import_resource(versions),
|
||||||
import_resource(rent_def)),
|
import_resource(assigned_def)),
|
||||||
)
|
)
|
||||||
PASSWORD_SCHEMES = {'pbkdf2_sha256'} # type: Set[str]
|
PASSWORD_SCHEMES = {'pbkdf2_sha256'} # type: Set[str]
|
||||||
DB_USER = config('DB_USER', 'dhub')
|
DB_USER = config('DB_USER', 'dhub')
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
from typing import Callable, Iterable, Tuple
|
||||||
|
from ereuse_devicehub.resources.action import schemas
|
||||||
|
from teal.resource import Resource
|
||||||
|
from ereuse_devicehub.resources.assigned.views import AssignedView
|
||||||
|
|
||||||
|
|
||||||
|
class AssignedDef(Resource):
|
||||||
|
VIEW = AssignedView
|
||||||
|
SCHEMA = schemas.Assigned
|
|
@ -10,7 +10,7 @@ from ereuse_devicehub.query import things_response
|
||||||
from ereuse_devicehub.resources.action.models import Assigned
|
from ereuse_devicehub.resources.action.models import Assigned
|
||||||
|
|
||||||
|
|
||||||
class RentingView(View):
|
class AssignedView(View):
|
||||||
@auth.Auth.requires_auth
|
@auth.Auth.requires_auth
|
||||||
def get(self, id: uuid.UUID) -> Assigned:
|
def get(self, id: uuid.UUID) -> Assigned:
|
||||||
return super().get(id)
|
return super().get(id)
|
|
@ -1,8 +0,0 @@
|
||||||
from ereuse_devicehub.resources.action import schemas
|
|
||||||
from teal.resource import Resource
|
|
||||||
from ereuse_devicehub.resources.rent.views import RentingView
|
|
||||||
|
|
||||||
|
|
||||||
class RentDef(Resource):
|
|
||||||
VIEW = RentingView
|
|
||||||
SCHEMA = schemas.Assigned
|
|
Reference in New Issue