Files
ImageApi/src/lib.rs
T
Cameron Cordes 2258a0eab5 feat(prefs): user_ai_prefs surface — GET/PUT /prefs, GET /timezones (#126)
- GET /prefs (JWT): current row or empty {voice, library, display_tz,
  updated_at} shape — snake_case, 200 with nulls when no row
- PUT /prefs (JWT): three-state partial update (omitted=unchanged,
  explicit null=clear, value=set) via hand-rolled TriState deserializer —
  serde derive conflates omitted with explicit null on Option<Option<T>>
- display_tz validated against chrono-tz before any write; invalid → 400,
  nothing written. tz_offset_minutes (frozen legacy) preserved verbatim
- GET /timezones (public): chrono_tz::TZ_VARIANTS — exactly the domain
  Tz::from_str accepts, so picker list and validation can't drift
- No migration; existing columns only. capture_prefs (POST /reels) untouched
- 14 tests: 3 GET /prefs, 7 PUT /prefs (incl. auth-gate), 2 /timezones,
  2 pure merge_patch. Full suite 1436 passed / 0 failed
2026-09-27 14:40:30 -04:00

50 lines
917 B
Rust

#![allow(clippy::too_many_arguments)]
#[macro_use]
extern crate diesel;
pub mod ai;
pub mod auth;
pub mod bin_progress;
pub mod camera_tz;
pub mod cleanup;
pub mod clip_search;
pub mod clip_watch;
pub mod content_hash;
pub mod data;
pub mod database;
pub mod date_resolver;
pub mod date_view;
pub mod duplicates;
pub mod error;
pub mod exif;
pub mod face_watch;
pub mod faces;
pub mod file_scan;
pub mod file_types;
pub mod filename_audit;
pub mod files;
pub mod geo;
pub mod libraries;
pub mod library_maintenance;
pub mod memories;
pub mod otel;
pub mod parsers;
pub mod perceptual_hash;
pub mod personas;
pub mod prefs;
pub mod service;
pub mod state;
pub mod tags;
#[cfg(test)]
pub mod testhelpers;
pub mod thumbnails;
pub mod unified_search;
pub mod utils;
pub mod video;
// Re-export commonly used types
pub use data::{Claims, ThumbnailRequest};
pub use database::{connect, schema};
pub use state::AppState;