Open kalicki opened 5 years ago
Async/Await, pseudo solution (maybe bad):
// Create query
const elementRecipe = await Recipe.find(query.filter).sort(query.sort);
// Set languages on values
if (lang) {
// return all elements only the lang requested
elementRecipe.map(values => {
values.setLanguage(lang);
});
}
Hey @alexsk, thanks for this plugin.
I have a problem with setDefaultLanguage for multiuser, your example dont work and setDefault for all models and not only this request by user.
the last language set to be for everyone is the latest sent in lang