feat(api): enhance image module management and export functionality

- Added read-write access to the darktable SQLite catalog for module parameter edits.
- Implemented new endpoints for exporting images and retrieving full-resolution images.
- Introduced PATCH method for updating module parameters with optional preview.
- Added comprehensive tests for new API functionalities, including module retrieval and error handling.
- Updated CORS headers to support new HTTP methods.
- Created detailed documentation for new API endpoints and module operations.
This commit is contained in:
2026-06-10 19:50:56 -04:00
parent bd40b4f850
commit 0831ee943c
13 changed files with 1362 additions and 52 deletions

View File

@@ -29,9 +29,10 @@ local function register(method, pattern, handler)
routes[#routes+1] = { method = method:upper(), parts = compile(pattern), handler = handler }
end
function M.get(pattern, handler) register("GET", pattern, handler) end
function M.post(pattern, handler) register("POST", pattern, handler) end
function M.put(pattern, handler) register("PUT", pattern, handler) end
function M.get(pattern, handler) register("GET", pattern, handler) end
function M.post(pattern, handler) register("POST", pattern, handler) end
function M.put(pattern, handler) register("PUT", pattern, handler) end
function M.patch(pattern, handler) register("PATCH", pattern, handler) end
function M.delete(pattern, handler) register("DELETE", pattern, handler) end
-- Match a request against registered routes.