コード例 #1
0
 def delete():
     """Delete the user profile."""
     token = g.jwt_oidc_token_info
     try:
         UserService.delete_user(token)
         response, status = '', http_status.HTTP_204_NO_CONTENT
     except BusinessException as exception:
         response, status = {'code': exception.code, 'message': exception.message}, exception.status_code
     return response, status
コード例 #2
0
    def delete():
        """Delete the user profile."""
        token = g.jwt_oidc_token_info
        try:
            UserService.delete_user(token)
            # Clean up test data during e2e test
            if Role.TESTER.value in token.get('realm_access').get('roles'):
                ResetService.reset(token)

            response, status = '', http_status.HTTP_204_NO_CONTENT
        except BusinessException as exception:
            response, status = {'code': exception.code, 'message': exception.message}, exception.status_code
        return response, status