This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates the current user's list of favorite dashboard pages.
Make sure to include the current revision number when calling this endpoint.
Note: Updating the list replaces the favorite pages it contains with those passed to the endpoint.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function updateUserFavoriteList(
_id: string,
favoriteList: UpdateUserFavoriteList,
options: UpdateUserFavoriteListOptions,
): Promise<DashboardFavoriteList>;
Dashboard favorite list ID. Automatically generated by Wix.
import { favoriteList } from "wix-dashboard-management.v2";
async function updateUserFavoriteList(id, favoriteList, options) {
try {
const result = await favoriteList.updateUserFavoriteList(
id,
favoriteList,
options,
);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.