diff options
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/services/SharingService.spec.ts | 5 | ||||
-rw-r--r-- | apps/files_sharing/src/services/SharingService.ts | 12 | ||||
-rw-r--r-- | apps/files_sharing/src/views/shares.spec.ts | 2 |
3 files changed, 5 insertions, 14 deletions
diff --git a/apps/files_sharing/src/services/SharingService.spec.ts b/apps/files_sharing/src/services/SharingService.spec.ts index 54e2355b082..db9cb81e348 100644 --- a/apps/files_sharing/src/services/SharingService.spec.ts +++ b/apps/files_sharing/src/services/SharingService.spec.ts @@ -19,12 +19,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ +import type { OCSResponse } from '@nextcloud/typings/ocs' import { expect } from '@jest/globals' -import axios from '@nextcloud/axios' import { Type } from '@nextcloud/sharing' import * as auth from '@nextcloud/auth' +import axios from '@nextcloud/axios' -import { getContents, type OCSResponse } from './SharingService' +import { getContents } from './SharingService' import { File, Folder } from '@nextcloud/files' import logger from './logger' diff --git a/apps/files_sharing/src/services/SharingService.ts b/apps/files_sharing/src/services/SharingService.ts index 2f167dab535..41861c5d3ea 100644 --- a/apps/files_sharing/src/services/SharingService.ts +++ b/apps/files_sharing/src/services/SharingService.ts @@ -21,6 +21,7 @@ */ /* eslint-disable camelcase, n/no-extraneous-import */ import type { AxiosPromise } from 'axios' +import type { OCSResponse } from '@nextcloud/typings/ocs' import { Folder, File, type ContentsWithRoot } from '@nextcloud/files' import { generateOcsUrl, generateRemoteUrl } from '@nextcloud/router' @@ -31,17 +32,6 @@ import logger from './logger' export const rootPath = `/files/${getCurrentUser()?.uid}` -export type OCSResponse<T> = { - ocs: { - meta: { - status: string - statuscode: number - message: string - }, - data: T[] - } -} - const headers = { 'Content-Type': 'application/json', } diff --git a/apps/files_sharing/src/views/shares.spec.ts b/apps/files_sharing/src/views/shares.spec.ts index 346af165f47..73a55434343 100644 --- a/apps/files_sharing/src/views/shares.spec.ts +++ b/apps/files_sharing/src/views/shares.spec.ts @@ -20,12 +20,12 @@ * */ /* eslint-disable n/no-extraneous-import */ +import type { OCSResponse } from '@nextcloud/typings/ocs' import { expect } from '@jest/globals' import { Folder, Navigation, View, getNavigation } from '@nextcloud/files' import axios from '@nextcloud/axios' import '../main' -import { type OCSResponse } from '../services/SharingService' import registerSharingViews from './shares' declare global { |