Jun 27 MT-6
This commit is contained in:
@@ -26,6 +26,7 @@ from app.models.inspection import Inspection, InspectionTemplate
|
||||
from app.models.facility import Facility, Area
|
||||
from app.api.errors import api_ok, api_error
|
||||
from app.api.decorators import jwt_required
|
||||
from app.tenancy.gates import feature_required, quota_soft_check
|
||||
from app.utils.audit import log_action, ACTION_CREATE, ACTION_UPDATE
|
||||
from app.utils.notifications import notify_by_matrix
|
||||
from app.utils.time_utils import now_eastern
|
||||
@@ -242,6 +243,8 @@ def list_inspections():
|
||||
|
||||
@bp.route('/inspections', methods=['POST'])
|
||||
@jwt_required
|
||||
@feature_required('mobile_api')
|
||||
@quota_soft_check('inspections')
|
||||
def create_inspection():
|
||||
"""
|
||||
Create a new inspection submitted from the iPad app.
|
||||
|
||||
@@ -32,6 +32,7 @@ from app.models.facility import Facility, Area
|
||||
from app.models.inspection import Inspection
|
||||
from app.api.errors import api_ok, api_error
|
||||
from app.api.decorators import jwt_required
|
||||
from app.tenancy.gates import feature_required, quota_soft_check
|
||||
from app.utils.audit import log_action, ACTION_CREATE, ACTION_UPDATE
|
||||
from app.utils.notifications import notify_by_matrix
|
||||
from app.utils.time_utils import now_eastern
|
||||
@@ -159,6 +160,8 @@ def list_issues():
|
||||
|
||||
@bp.route('/issues', methods=['POST'])
|
||||
@jwt_required
|
||||
@feature_required('mobile_api')
|
||||
@quota_soft_check('issues')
|
||||
def create_issue():
|
||||
"""
|
||||
Create a new issue submitted from the iPad app.
|
||||
|
||||
Reference in New Issue
Block a user