Run the sync function on the given document and body. Need to inject the document ID and rev ID temporarily to run the sync function.
(ctx context.Context, doc *Document, body Body, metaMap map[string]interface{}, newRevId string)
| 2311 | // Run the sync function on the given document and body. Need to inject the document ID and rev ID temporarily to run |
| 2312 | // the sync function. |
| 2313 | func (db *DatabaseCollectionWithUser) runSyncFn(ctx context.Context, doc *Document, body Body, metaMap map[string]interface{}, newRevId string) (*uint32, string, base.Set, channels.AccessMap, channels.AccessMap, error) { |
| 2314 | channelSet, access, roles, syncExpiry, oldBody, err := db.getChannelsAndAccess(ctx, doc, body, metaMap, newRevId) |
| 2315 | if err != nil { |
| 2316 | return nil, ``, nil, nil, nil, err |
| 2317 | } |
| 2318 | db.checkDocChannelsAndGrantsLimits(ctx, doc.ID, channelSet, access, roles) |
| 2319 | return syncExpiry, oldBody, channelSet, access, roles, nil |
| 2320 | } |
| 2321 | |
| 2322 | func (db *DatabaseCollectionWithUser) recalculateSyncFnForActiveRev(ctx context.Context, doc *Document, metaMap map[string]interface{}, newRevID string) (channelSet base.Set, access, roles channels.AccessMap, syncExpiry *uint32, oldBodyJSON string, err error) { |
| 2323 | // In some cases an older revision might become the current one. If so, get its |
no test coverage detected