Skip to content

Commit

Permalink
webhook endpoint hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
voynow committed Nov 13, 2024
1 parent 78cb79b commit f8a33ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions api/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ async def authenticate(code: str, email: Optional[str] = None) -> dict:
raise HTTPException(status_code=400, detail=str(e))





def process_strava_event(event: StravaEvent):
"""
Process the Strava webhook event. Perform any updates based on the event data.
Expand All @@ -149,7 +146,7 @@ def process_strava_event(event: StravaEvent):
# For example, handle_activity_create(user, event)


@app.post("/strava/webhook")
@app.post("/strava-webhook/")
async def strava_webhook(request: Request, background_tasks: BackgroundTasks):
event = await request.json()
logger.info(f"Received Strava webhook event: {event}")
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/strava_webhook/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function POST(request: NextRequest) {
console.log(`Received POST request with event: ${JSON.stringify(event)}`);

try {
const response = await fetch('http://trackflow-alb-499532887.us-east-1.elb.amazonaws.com/strava-webhook', {
const response = await fetch('http://trackflow-alb-499532887.us-east-1.elb.amazonaws.com/strava-webhook/', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(event),
Expand Down

0 comments on commit f8a33ad

Please sign in to comment.