def post(self):
    args = self.parser.parse_args()
    if (not User.query.filter_by(email=args['email']).scalar()):
        User(email=args['email'], password=args['password']).save()
        return {'message': 'Sign up successfully'}
    abort(400, message='Email already exists.')
def post(self):
    args = self.parser.parse_args()
    if (not User.query.filter_by(email=args['email']).scalar()):
        User(email=args['email'], password=args['password']).save()
        return {'message': 'Sign up successfully'}
    abort(400, message='Email already exists.')