commit
ef3afdded1
|
@ -111,7 +111,7 @@ class DashboardWidgetListResource(ProtectedResource):
|
||||||
@swag_from('swagger/create_dashboard_widget_spec.yaml')
|
@swag_from('swagger/create_dashboard_widget_spec.yaml')
|
||||||
def post(self, args, dashboard_id):
|
def post(self, args, dashboard_id):
|
||||||
validate_dashboard_ownership(dashboard_id)
|
validate_dashboard_ownership(dashboard_id)
|
||||||
validate_dashboard_ownership(args['device_id'])
|
validate_device_ownership(args['device_id'])
|
||||||
success = dashboard.create_widget(
|
success = dashboard.create_widget(
|
||||||
dashboard_id,
|
dashboard_id,
|
||||||
args['device_id'],
|
args['device_id'],
|
||||||
|
@ -142,7 +142,7 @@ class DashboardWidgetResource(ProtectedResource):
|
||||||
@swag_from('swagger/update_dashboard_widget_spec.yaml')
|
@swag_from('swagger/update_dashboard_widget_spec.yaml')
|
||||||
def put(self, args, dashboard_id, widget_id):
|
def put(self, args, dashboard_id, widget_id):
|
||||||
validate_dashboard_ownership(dashboard_id)
|
validate_dashboard_ownership(dashboard_id)
|
||||||
validate_dashboard_ownership(args['device_id'])
|
validate_device_ownership(args['device_id'])
|
||||||
success = dashboard.patch_widget(
|
success = dashboard.patch_widget(
|
||||||
widget_id,
|
widget_id,
|
||||||
args['device_id'],
|
args['device_id'],
|
||||||
|
@ -160,7 +160,7 @@ class DashboardWidgetResource(ProtectedResource):
|
||||||
def patch(self, args, dashboard_id, widget_id):
|
def patch(self, args, dashboard_id, widget_id):
|
||||||
validate_dashboard_ownership(dashboard_id)
|
validate_dashboard_ownership(dashboard_id)
|
||||||
if args.get('device_id') is not None:
|
if args.get('device_id') is not None:
|
||||||
validate_dashboard_ownership(args['device_id'])
|
validate_device_ownership(args['device_id'])
|
||||||
success = dashboard.patch_widget(
|
success = dashboard.patch_widget(
|
||||||
widget_id,
|
widget_id,
|
||||||
args.get('device_id'),
|
args.get('device_id'),
|
||||||
|
|
|
@ -2,7 +2,7 @@ import os
|
||||||
|
|
||||||
# App configuration
|
# App configuration
|
||||||
DEBUG = os.environ['DEBUG']
|
DEBUG = os.environ['DEBUG']
|
||||||
APP_VERSION = '0.3.0'
|
APP_VERSION = '0.3.1'
|
||||||
|
|
||||||
# Define the application directory
|
# Define the application directory
|
||||||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
Loading…
Reference in New Issue