Files
doctate/server/Cargo.toml
T
Brummel 94392e72d8 feat: Add API endpoint for listing oneliners
This commit introduces a new API endpoint `/api/oneliners` that allows
authenticated users to retrieve a list of their recent oneliners.

The endpoint supports conditional GET requests using the `ETag` header
for efficient caching. It also allows specifying a time window for the
oneliners via the `hours` query parameter, with sensible defaults and
clamping.

The implementation includes:
- A new route handler `handle_oneliners`.
- A new type `OnelinerWatermark` for tracking user-specific timestamps.
- Logic for scanning user data directories, filtering by time, and
  handling deleted cases.
- Test cases to cover various scenarios, including caching, time
  windowing, and edge cases.
2026-04-18 09:27:23 +02:00

37 lines
987 B
TOML

[package]
name = "doctate-server"
version.workspace = true
edition.workspace = true
default-run = "doctate-server"
[dependencies]
doctate-common = { path = "../doctate-common" }
axum = { version = "0.8", features = ["multipart"] }
tokio.workspace = true
reqwest.workspace = true
tempfile = "3"
askama = "0.12"
tracing.workspace = true
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-appender = "0.2"
dotenvy = "0.15"
uuid.workspace = true
serde.workspace = true
serde_json.workspace = true
toml.workspace = true
tower-http = { version = "0.6", features = ["limit", "trace"] }
rand = "0.8"
bcrypt = "0.15"
axum-extra = { version = "0.12", features = ["cookie", "form"] }
time.workspace = true
toml_edit = "0.25.11"
rpassword = "7.4.0"
pulldown-cmark = { version = "0.13", default-features = false, features = ["html"] }
strsim = "0.11"
spellbook = "0.4.0"
[dev-dependencies]
tower = { version = "0.5", features = ["util"] }
wiremock = "0.6"
filetime = "0.2"