Skip to content

Commit

Permalink
Showing 2 changed files with 1 addition and 11 deletions.
3 changes: 1 addition & 2 deletions src/boot/app/app-loader-functions.ts
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ import {
import { getSoapFetch, getXmlSoapFetch } from '../../network/fetch';
import { getTags, useTags } from '../../store/tags';
import { useNotify, useRefresh } from '../../store/network';
import { changeTagColor, createTag, deleteTag, renameTag, updateTag } from '../../network/tags';
import { changeTagColor, createTag, deleteTag, renameTag } from '../../network/tags';

// eslint-disable-next-line @typescript-eslint/ban-types
export const getAppFunctions = (pkg: CarbonioModule): Record<string, Function> => ({
@@ -122,7 +122,6 @@ export const getAppFunctions = (pkg: CarbonioModule): Record<string, Function> =
renameTag,
changeTagColor,
deleteTag,
updateTag,
// STUFF
useIsMobile,
getBridgedFunctions: (): unknown => {
9 changes: 0 additions & 9 deletions src/network/tags.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/

import produce from 'immer';
import {
CreateTagRequest,
CreateTagResponse,
@@ -13,10 +12,8 @@ import {
} from '../../types';
import { Tag } from '../../types/tags';
import { SHELL_APP_ID } from '../constants';
import { useTagStore } from '../store/tags';
import { getSoapFetch } from './fetch';

const set = useTagStore.setState;
export const createTag = (tag: Omit<Tag, 'id'>): Promise<CreateTagResponse> =>
getSoapFetch(SHELL_APP_ID)<CreateTagRequest, CreateTagResponse>('CreateTag', {
_jsns: 'urn:zimbraMail',
@@ -34,12 +31,6 @@ export const renameTag = (id: string, name: string): Promise<TagActionResponse>
action: { op: 'rename', id, name }
});

export const updateTag = (tag: Partial<Tag> & { id: string }): Promise<TagActionResponse> =>
getSoapFetch(SHELL_APP_ID)<TagActionRequest, TagActionResponse>('TagAction', {
_jsns: 'urn:zimbraMail',
action: { op: 'update', ...tag }
});

export const changeTagColor = (id: string, color: string | number): Promise<TagActionResponse> =>
getSoapFetch(SHELL_APP_ID)<TagActionRequest, TagActionResponse>('TagAction', {
_jsns: 'urn:zimbraMail',

0 comments on commit 3d91016

Please sign in to comment.