From bd4c2b393eb56980e5eeb556eec54efd573f6ef2 Mon Sep 17 00:00:00 2001 From: Grayson Adams <51373669+GraysonCAdams@users.noreply.github.com> Date: Wed, 11 Mar 2026 23:48:25 -0500 Subject: [PATCH] docs: update api.md for PATCH watched endpoint --- docs/api.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/api.md b/docs/api.md index 1ddb400..ea9acce 100644 --- a/docs/api.md +++ b/docs/api.md @@ -140,6 +140,7 @@ Returns dismissed clips with thumbnail, platform, uploader info, and dismissal t | Method | Path | Description | |--------|------|-------------| | POST | `/api/clips/[id]/watched` | Mark clip as watched | +| PATCH | `/api/clips/[id]/watched` | Update watch percent only | | DELETE | `/api/clips/[id]/watched` | Mark clip as unwatched | | POST | `/api/clips/[id]/favorite` | Toggle favorite | | GET | `/api/clips/[id]/views` | List who has viewed | @@ -163,6 +164,13 @@ Request: { "watchPercent": 85 } (optional, 0–100) Response: { "watched": true } ``` +### PATCH /api/clips/[id]/watched +Updates watch percent without marking the clip as watched. Only updates existing watched records — does not create new ones. Used for periodic progress tracking while the user is still viewing. +``` +Request: { "watchPercent": 85 } (0–100) +Response: { "updated": true } +``` + ### POST /api/clips/[id]/favorite Toggles favorite on/off. Also syncs with reactions: favoriting creates a ❤️ reaction (with notification), unfavoriting removes the paired ❤️ reaction and its notification. ```