Run function in aggregation and pass params

Hey there!

Can you please tell me how to pass params of functions when doing aggregation?

...
{
            project: {
                image: getFanaticImageUrl($faction, $kind),
            }
        }
...

This code does not work. $faction and $kind are not defined. addFields does not work as well. $function expects function as string, so it’s quite uncomfortable…

I don’t know how to do that, maybe you can create another column in that table that saves that imageUrl directly and after that you can access it directly

Okey, will add it in database directly. Thanks