Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send response here #542

Open
freelancing-solutions opened this issue Jul 27, 2021 · 0 comments
Open

Send response here #542

freelancing-solutions opened this issue Jul 27, 2021 · 0 comments
Labels

Comments

@freelancing-solutions
Copy link
Owner

Send response here

                            'message': 'successfully updated ticket'}), 200
        return jsonify({'status': False, 'message': 'Unable to find ticket'}), 500

    @use_context
    @handle_view_errors
    async def send_response_by_email_async(self, ticket_id: str, subject: str, message: str) -> tuple:
        """
            find ticket send email response mark ticket save ticket save response
        """
        ticket_instance: Ticket = Ticket.query(Ticket.ticket_id == ticket_id).get_async().get_result()
        if isinstance(ticket_instance, Ticket):
            ticket_instance.response_sent = True
            key = ticket_instance.put_async().get_result()
            # TODO Send response here
            if key is None:
                return jsonify({'status': False, 'message': 'General error updating database'}), 500
            return jsonify({'status': True, 'payload': ticket_instance.to_dict(),
                            'message': 'successfully updated ticket'}), 200
        return jsonify({'status': False, 'message': 'Unable to find ticket'}), 500

    @use_context
    @handle_view_errors
    def send_sms_notification(self, ticket_id: str, subject: str, message: str) -> tuple:

1422d59f99f02087d6dca8b31e8089b94dd0131e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant