kolaente and kolaente
8bec654595
refactor(background): extract download + unsplash-proxy logic for reuse
...
Split the HTTP plumbing from the business logic in the v1 project-background
download and Unsplash image proxy handlers so /api/v2 can reuse it without
duplicating it:
- LoadProjectBackgroundForDownload (background/handler) loads the bg file +
modtime and fires the Unsplash pingback; GetProjectBackground now calls it.
- WriteProjectBackground (web/files) writes v1's exact background wire shape
(image/jpg, no-cache, stat-modtime Last-Modified, If-Modified-Since 304).
- FetchUnsplashImageByID / FetchUnsplashThumbByID (background/unsplash) return
the open upstream body for the caller to stream; the v1 proxy handlers now
call them. A typed ErrUnsplashImageDoesNotExist maps to 404 on both APIs.
- ErrProjectHasNoBackground (models) gives the no-background case a domain
error; v1 keeps its verbatim 404 message.
v1 responses are unchanged on the wire.
2026-06-17 11:31:50 +00:00
..
2026-04-20 18:55:06 +00:00
2026-04-20 18:55:06 +00:00
2026-06-11 19:32:42 +00:00
2026-04-20 18:55:06 +00:00
2026-06-11 19:32:42 +00:00
2026-06-11 19:32:42 +00:00
2026-06-08 13:54:09 +00:00
2026-06-08 13:54:09 +00:00
2026-03-30 12:28:15 +00:00
2026-03-30 12:28:15 +00:00
2026-03-30 12:28:15 +00:00
2026-05-15 17:25:09 +02:00
2026-05-01 14:44:10 +00:00
2026-05-15 17:25:09 +02:00
2026-06-12 08:56:08 +00:00
2026-05-01 14:44:10 +00:00
2026-05-01 14:44:10 +00:00
2026-06-05 08:51:39 +00:00
2026-06-09 20:13:02 +00:00
2026-05-20 21:02:14 +00:00
2026-05-20 21:02:14 +00:00
2026-06-17 11:31:50 +00:00
2026-06-12 08:56:08 +00:00
2026-03-23 16:23:15 +01:00
2026-04-09 10:45:34 +00:00
2026-06-09 20:01:20 +00:00
2026-06-09 11:40:04 +00:00
2026-06-10 11:56:05 +02:00
2026-06-09 11:40:04 +00:00
2026-05-31 15:27:44 +02:00
2026-06-05 09:17:25 +00:00
2026-04-09 15:38:07 +00:00
2026-06-05 09:17:25 +00:00
2026-06-12 08:56:08 +00:00
2026-03-08 16:03:47 +01:00
2026-06-02 11:55:25 +00:00
2026-05-30 13:48:01 +00:00
2026-06-08 13:54:09 +00:00
2026-06-07 10:05:24 +00:00
2026-05-15 17:25:09 +02:00
2026-05-15 17:25:09 +02:00
2026-03-27 23:05:04 +00:00
2026-06-09 20:11:43 +00:00
2026-04-20 18:55:06 +00:00
2026-04-20 18:55:06 +00:00
2026-06-12 08:56:08 +00:00
2026-04-11 17:20:53 +00:00
2026-04-20 18:55:06 +00:00
2026-06-12 08:56:08 +00:00
2026-04-20 18:55:06 +00:00
2026-06-01 13:04:34 +00:00
2026-06-12 08:56:08 +00:00
2026-06-09 21:34:22 +00:00
2026-04-09 07:25:57 +00:00
2026-06-07 10:40:20 +00:00
2026-06-05 08:21:48 +00:00
2026-06-08 13:54:09 +00:00
2026-06-07 09:57:51 +00:00
2026-06-09 19:42:16 +00:00
2026-04-09 16:22:56 +00:00
2026-06-10 10:22:39 +00:00
2026-06-08 13:54:09 +00:00
2026-05-19 10:35:43 +02:00
2026-06-11 18:31:03 +00:00
2026-06-12 08:56:08 +00:00
2026-06-03 19:57:26 +00:00
2026-03-04 17:20:26 +01:00
2026-06-01 14:13:39 +02:00
2026-03-08 19:45:53 +01:00
2026-03-08 19:45:53 +01:00
2026-04-09 07:25:57 +00:00
2026-06-10 11:55:51 +02:00
2026-04-05 12:20:35 +00:00
2026-06-09 20:42:00 +00:00
2026-03-08 19:45:53 +01:00
2026-03-08 19:45:53 +01:00
2026-04-02 16:30:23 +00:00
2026-05-31 12:56:57 +00:00
2026-06-12 08:56:08 +00:00
2026-06-10 10:12:09 +00:00
2026-04-20 18:55:06 +00:00
2026-06-07 10:48:23 +00:00
2026-04-20 18:55:06 +00:00
2026-06-12 08:56:08 +00:00
2026-06-08 13:54:09 +00:00
2026-06-12 08:56:08 +00:00
2026-06-08 13:54:09 +00:00
2026-05-06 16:08:16 +02:00
2026-05-01 14:44:10 +00:00
2026-05-01 14:44:10 +00:00
2026-06-11 20:07:43 +00:00
2026-06-12 08:56:08 +00:00
2026-06-12 08:56:08 +00:00
2026-03-08 19:45:53 +01:00
2026-06-10 19:12:41 +00:00