method
LocalAPI.Publish
func (local *LocalAPI) Publish(
ctx context.Context,
collection,
id string,
expectedRevision int,
actor *store.Document,
localeOptions ...LocaleOptions,
) (store.Document, error)Publish one authorized versioned document.
Example
published, err := app.Local().Publish(
ctx,
"posts",
postID,
currentRevision,
actor,
)Related types
LocalAPIIn-process content operations that share the REST authorization and lifecycle pipeline.
DocumentA stored document with status and version metadata.
LocaleOptionsLocale selection for one single-document Local API operation.