def get(self): if SQL.test_connect_to_dbo(): paginationModel = PaginationHelper( request.args, 'FormKey', ["FormKey", "FormName", "IsActive"]) forms = SQL.get_all_forms(paginationModel) response = app.response_class(response=json.dumps(forms), status=200, mimetype='application/json') return response else: response = app.response_class(status=424, mimetype='application/json') return response
def get(self): if SQL.test_connect_to_dbo(): paginationModel = PaginationHelper(request.args, 'Title', ["Title", "Story", "IsActive"]) stories = SQL.get_all_stories(paginationModel) response = app.response_class(response=json.dumps(stories), status=200, mimetype='application/json') return response else: response = app.response_class(status=424, mimetype='application/json') return response
def get(self): if SQL.test_connect_to_dbo(): paginationModel = PaginationHelper( request.args, 'HelpContentKey', ["HelpContentKey", "HelpTitle", "HelpContent", "IsActive"]) content = SQL.get_all_documentation(paginationModel) response = app.response_class(response=json.dumps(content), status=200, mimetype='application/json') return response else: response = app.response_class(status=424, mimetype='application/json') return response
def get(self): if SQL.test_connect_to_dbo(): paginationModel = PaginationHelper(request.args, 'CreateDate', [ "Title", "CreateDate", "ItemType", "IsApproved", "IsReviewed" ]) items = SQL.get_submitted_items(paginationModel) response = app.response_class(response=json.dumps(items), status=200, mimetype='application/json') return response else: response = app.response_class(status=424, mimetype='application/json') return response
def get(self): if SQL.test_connect_to_dbo(): isMaster = request.args.get('isMaster') paginationModel = PaginationHelper(request.args, 'Username', [ "Id", "Username", "FirstName", "LastName", "IsActive", "CreateDate" ]) data = SQL.get_all_users(isMaster, paginationModel) response = app.response_class(response=json.dumps(data), status=200, mimetype='application/json') return response else: response = app.response_class(status=424, mimetype='application/json') return response
def get(self): if SQL.test_connect_to_dbo(): accountId = request.args.get('accountId') isMaster = request.args.get('masterAdmin') paginationModel = PaginationHelper(request.args, "Username", [ "Username", "FirstName", "LastName", "IsActive", "IsLocked", "CreateDate" ]) accountInformation = SQL.get_account_users(accountId, isMaster, paginationModel) response = app.response_class( response=json.dumps(accountInformation), status=200, mimetype='application/json') return response else: response = app.response_class(status=424, mimetype='application/json') return response