mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
add sanity tests for favourites list view
This commit is contained in:
@@ -40,6 +40,18 @@ export class FavoritesApi extends RepoApi {
|
||||
.catch(this.handleError);
|
||||
}
|
||||
|
||||
addFavoriteById(nodeType: string, id: string): Promise<any> {
|
||||
const data = [{
|
||||
target: {
|
||||
[nodeType]: {
|
||||
guid: id
|
||||
}
|
||||
}
|
||||
}];
|
||||
return this.post(`/people/-me-/favorites`, { data })
|
||||
.catch(this.handleError);
|
||||
}
|
||||
|
||||
getFavorite(api: RepoClient, name: string): Promise<any> {
|
||||
return api.nodes.getNodeByPath(name)
|
||||
.then((response) => {
|
||||
|
Reference in New Issue
Block a user