pub async fn mint_preview_token(
conn: &mut PgConnection,
course_id: Uuid,
changeset_id: Option<Uuid>,
page_id: Option<Uuid>,
user_id: Uuid,
) -> ModelResult<PreviewToken>Expand description
Mints a short-lived preview token for the page page_id of the course, or for all its pages
with None, as changeset_id stages them or published without one. Also deletes expired
tokens.