Skip to content

Commit

Permalink
breakfix publish false
Browse files Browse the repository at this point in the history
breakfix for default key in the body causing a blank body to be required on the request. Moving this to a URL parameter
  • Loading branch information
parishwolfe committed Dec 9, 2024
1 parent 8f4578c commit 60e7f77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 3 additions & 4 deletions app/endpoints/products.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
from res.models.objects import TshirtWithIds, QueueItem
from res.models.requests import (
PatternRequest,
PatternQueuePostRequest,
PatternQueueGetRequest
PatternQueuePostRequest
)
from res.models.responses import PatternResponse
from middleware.security import verify_api_key
Expand Down Expand Up @@ -79,7 +78,7 @@ def add_patterns_to_queue(

@router.get("/pattern_queue")
def process_pattern_queue(
request: PatternQueueGetRequest,
publish: bool = False,
api_key: str = Depends(verify_api_key),
firestore_db=Depends(get_firestore_db)
):
Expand All @@ -97,7 +96,7 @@ def process_pattern_queue(
PatternRequest(
patterns=pattern_to_be.patterns,
idea=pattern_to_be.idea,
publish=request.publish
publish=publish
),
api_key=api_key,
firestore_db=firestore_db
Expand Down
4 changes: 0 additions & 4 deletions app/res/models/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ class PatternRequest(BaseModel):

class PatternQueuePostRequest(BaseModel):
queue: list[ProductQueue]


class PatternQueueGetRequest(BaseModel):
publish: Optional[bool] = False

0 comments on commit 60e7f77

Please sign in to comment.