Skip to content
Snippets Groups Projects
Commit 5d95f84b authored by David Büchler's avatar David Büchler
Browse files

#1065853 Nutzung der neuen fluent favorites api

parent 14e055c7
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,8 @@ if(vars.get("$local.idvalues") && vars.get("$local.idvalues").length != 0)
var selectedFavos = [];
for(h = 0; h < selected.length; h++)
selectedFavos.push(buildFavoriteForDeletion(favorite.getFavoriteById(selected[h])));
selectedFavos.push(buildFavoriteForDeletion(favorite.getFavorites(favorite.createGetFavoriteByIdConfig()
.setId(selected[h]))));
result.object(selectedFavos);
}
......@@ -33,7 +34,9 @@ else
var allContexts = getAllFavoriteEnabledContexts();
for(i = 0; i < allContexts.length; i++)
{
var allFavorites = favorite.getAllFavorites(tools.getCurrentUser()["name"], allContexts[i]);
var allFavorites = favorite.getFavorites(favorite.createGetFavoritesConfig()
.setUserId(tools.getCurrentUser()["name"])
.setObjectType(allContexts[i]));
var builtFavos = buildFavorites(allFavorites, allContexts[i]);
for(let x = 0; x < builtFavos.length; x++)
......
import("system.vars");
import("system.favorite");
favorite.removeFavoriteById(vars.get("$local.uid"));
\ No newline at end of file
favorite.remove(favorite.createRemoveByIdConfig().setFavoriteRecordId(vars.get("$local.uid")));
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment