Skip to main content

add

Function add 

Source
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_VERSION notes per version (409).
  • Audit: annotation.add on the revision.