pub async fn add(
pool: &PgPool,
actor: &Actor,
version_id: Uuid,
new: NewAnnotation,
) -> AppResult<Annotation>Expand description
Pins a note to a point of a file version.
§Invariants
- Permission: the version is readable (“not found” otherwise).
- Limits: text 1–2000 characters, finite coordinates (400), at most
MAX_PER_VERSIONnotes per version (409). - Audit:
annotation.addon the revision.