IMAGINATION IN PROGRESS

Skip to content

Add FastAPI Endpoints for District Competition Upload and General Upload

We need two endpoints to start with:

  1. "/api/v1/upload-photos/district-competitions/{district}"
  2. "/api/v1/upload-photos/general"

Both endpoints should be associated with unique functions, each being async as with other endpoint functions, and accepting a list of UploadFile objects. This will require a little import addition:

from fastapi import File, UploadFile

(we might already have this, can't recall - and couldn't be bothered to look)

The upload endpoint functions should follow the pattern here:

@app.post("/api/v1/upload-photos/district-competitions/{district}")
async def district_competition_photo_upload(district: str, files: list[UploadFile] = File(...)):
    # Validate that district is one of the supported values
    # TODO
    # Perform Lychee Upload
    # TODO
Edited by Joe Stanley