Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Revert "added draft for PUT endpoint"
Browse files Browse the repository at this point in the history
This reverts commit 2bb6101.
  • Loading branch information
DonHaul committed Aug 13, 2024
1 parent 2bb6101 commit 13e97e8
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions backoffice/backoffice/workflows/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,33 +127,6 @@ def create(self, request):
workflow.data,
)

@extend_schema(
summary="Updates an Author",
description="Updates an author, launches the required airflow dag.",
request=serializer_class,
)
def update(self, request, pk=None):
logger.info("Creating workflow with data: %s", request.data)
serializer = self.serializer_class(data=request.data)
if serializer.is_valid(raise_exception=True):
workflow = Workflow.objects.create(
data=serializer.validated_data["data"],
workflow_type=WorkflowType.AUTHOR_UPDATE,
)
logger.info("workflow type is")
logger.info(workflow.workflow_type)

logger.info(
"Trigger Airflow DAG: %s for %s",
WORKFLOW_DAGS[workflow.workflow_type].initialize,
workflow.id,
)
return airflow_utils.trigger_airflow_dag(
WORKFLOW_DAGS[workflow.workflow_type].initialize,
str(workflow.id),
workflow.data,
)

@extend_schema(
summary="Partially Updates Author",
description="Updates specific fields of the author.",
Expand Down

0 comments on commit 13e97e8

Please sign in to comment.