From 7c3290c4e6e39f8f34d4afccc4a03ff47ba6586a Mon Sep 17 00:00:00 2001 From: denis0001-dev Date: Wed, 23 Jul 2025 21:57:00 +0300 Subject: [PATCH 01/15] Add photos API endpoints Signed-off-by: denis0001-dev --- backend/main/API_DOCS.md | 55 +++++++++++++++++++++++++++++- backend/main/app.py | 3 +- backend/main/models.py | 15 ++++++-- backend/main/routes/photos.py | 64 +++++++++++++++++++++++++++++++++++ 4 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 backend/main/routes/photos.py diff --git a/backend/main/API_DOCS.md b/backend/main/API_DOCS.md index 144e9bce..2d29460d 100644 --- a/backend/main/API_DOCS.md +++ b/backend/main/API_DOCS.md @@ -293,4 +293,57 @@ The Toolbox.io Telegram bot provides the same support functionality as the web i ## Authentication - All protected endpoints require the `Authorization: Bearer ` header. -- JWT tokens are returned by `/api/auth/login` and must be stored securely on the client. \ No newline at end of file +- JWT tokens are returned by `/api/auth/login` and must be stored securely on the client. + +--- + +## Photo Storage Endpoints + +All `/photos/*` endpoints are under the `/photos` prefix and require authentication (`Authorization: Bearer `). + +### GET `/photos/sync` +- **Description:** List all photo UUIDs and metadata for the authenticated user (for sync). +- **Headers:** + - `Authorization: Bearer ` +- **Response:** + ```json + { + "photos": [ + {"uuid": "", "uploaded_at": "T