GetDefaultSyncFunction returns a sync function. The case of default collection will return a different sync function than one for collections.
(scopeName, collectionName string)
| 54 | |
| 55 | // GetDefaultSyncFunction returns a sync function. The case of default collection will return a different sync function than one for collections. |
| 56 | func GetDefaultSyncFunction(scopeName, collectionName string) string { |
| 57 | if base.IsDefaultCollection(scopeName, collectionName) { |
| 58 | return DocChannelsSyncFunction |
| 59 | } |
| 60 | return `function(doc){channel("` + collectionName + `");}` |
| 61 | |
| 62 | } |
| 63 | |
| 64 | func (mapper *ChannelMapper) MapToChannelsAndAccess(ctx context.Context, body map[string]interface{}, oldBodyJSON string, metaMap map[string]interface{}, userCtx map[string]interface{}) (*ChannelMapperOutput, error) { |
| 65 | numberFixBody := ConvertJSONNumbers(body) |