コード例 #1
0
def save_message():
    try:
        svc = Service()
        svc_response = svc.save_message(request.data)
        return SvcUtils.handle_response(svc_response, status.HTTP_201_CREATED)
    except Exception as ex:
        return SvcError.handle_error(ex)
コード例 #2
0
def get_message_by_username(username):
    try:
        svc = Service()
        svc_response = svc.get_message_by_username(username)
        return SvcUtils.handle_response(svc_response, status.HTTP_200_OK)
    except Exception as ex:
        return SvcError.handle_error(ex)
コード例 #3
0
def ping():
    try:
        svc = Service()
        svc_response = svc.ping()
        return SvcUtils.handle_response(svc_response, status.HTTP_200_OK)
    except Exception as ex:
        return SvcError.handle_error(ex)
コード例 #4
0
def get_message_by_username(username):
    try:
        svc = Service()
        svc_response = svc.get_message_by_username(username)
        return SvcUtils.handle_response(svc_response, status.HTTP_200_OK)
    except Exception as ex:
        return SvcError.handle_error(ex)
コード例 #5
0
def save_message():
    try:
        svc = Service()
        svc_response = svc.save_message(request.data)
        return SvcUtils.handle_response(svc_response, status.HTTP_201_CREATED)
    except Exception as ex:
        return SvcError.handle_error(ex)
コード例 #6
0
def ping():
    try:
        svc = Service()
        svc_response = svc.ping()
        return SvcUtils.handle_response(svc_response, status.HTTP_200_OK)
    except Exception as ex:
        return SvcError.handle_error(ex)
コード例 #7
0
ファイル: controller.py プロジェクト: EnzoGunn/CheckPoint
def process_event():
    try:
        svc = Service()
        svc.process_event(request.data)
        return SvcUtils.handle_response(status.HTTP_200_OK)
    except Exception as ex:
        return SvcError.handle_error(ex)