This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a list of favorite dashboard pages for the current user. A user can only have one such list.
Note: When first calling this endpoint, you can create a list that contains one or more favorite dashboard pages. However, if a list already exists for that user, calling this endpoint generates an error.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function createUserFavoriteList(
favoriteList: DashboardFavoriteList,
): Promise<DashboardFavoriteList>;
Dashboard favorite list to create.
import { favoriteList } from "wix-dashboard-management.v2";
async function createUserFavoriteList(favoriteList) {
try {
const result = await favoriteList.createUserFavoriteList(favoriteList);
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.