end point receive
This commit is contained in:
parent
c75cdb2c60
commit
a1eb0f4c90
|
@ -3,7 +3,7 @@ from typing import Callable, Iterable, Tuple
|
||||||
from teal.resource import Converters, Resource
|
from teal.resource import Converters, Resource
|
||||||
|
|
||||||
from ereuse_devicehub.resources.action import schemas
|
from ereuse_devicehub.resources.action import schemas
|
||||||
from ereuse_devicehub.resources.action.views import ActionView
|
from ereuse_devicehub.resources.action.views import ActionView, ReceiveView
|
||||||
from ereuse_devicehub.resources.device.sync import Sync
|
from ereuse_devicehub.resources.device.sync import Sync
|
||||||
|
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ class DisposeProductDef(ActionDef):
|
||||||
|
|
||||||
|
|
||||||
class ReceiveDef(ActionDef):
|
class ReceiveDef(ActionDef):
|
||||||
VIEW = None
|
VIEW = ReceiveView
|
||||||
SCHEMA = schemas.Receive
|
SCHEMA = schemas.Receive
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import shutil
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from distutils.version import StrictVersion
|
from distutils.version import StrictVersion
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
from flask.json import jsonify
|
||||||
|
|
||||||
from flask import current_app as app, request, g
|
from flask import current_app as app, request, g
|
||||||
from sqlalchemy.util import OrderedSet
|
from sqlalchemy.util import OrderedSet
|
||||||
|
@ -168,3 +169,11 @@ class ActionView(View):
|
||||||
def transfer_ownership(self):
|
def transfer_ownership(self):
|
||||||
"""Perform a InitTransfer action to change author_id of device"""
|
"""Perform a InitTransfer action to change author_id of device"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class ReceiveView(View):
|
||||||
|
|
||||||
|
def post(self):
|
||||||
|
return jsonify('Ok')
|
||||||
|
|
||||||
|
def find(self, args):
|
||||||
|
return jsonify('Ok find')
|
||||||
|
|
Reference in New Issue