MCPcopy
hub / github.com/makeplane/plane / add

Method add

packages/services/src/user/favorite.service.ts:28–34  ·  view source on GitHub ↗

* Adds a new item to user favorites * @param {string} workspaceSlug - The unique slug identifier for the workspace * @param {Partial } data - Favorite item data to be added * @returns {Promise } Promise resolving to the created favorite item * @throws {Error} If the A

(workspaceSlug: string, data: Partial<IFavorite>)

Source from the content-addressed store, hash-verified

26 * @throws {Error} If the API request fails
27 */
28 async add(workspaceSlug: string, data: Partial<IFavorite>): Promise<IFavorite> {
29 return this.post(`/api/workspaces/${workspaceSlug}/user-favorites/`, data)
30 .then((response) => response?.data)
31 .catch((error) => {
32 throw error?.response;
33 });
34 }
35
36 /**
37 * Updates an existing favorite item

Callers 15

loadPrimaryLanguagesMethod · 0.80
saveFunction · 0.80
setTableToFullWidthFunction · 0.80
restorePublicImagesFunction · 0.80
hideDragHandleFunction · 0.80
DragHandlePluginFunction · 0.80
TrackFileDeletionPluginFunction · 0.80
addCommandsFunction · 0.80

Calls 1

postMethod · 0.45

Tested by

no test coverage detected