moved user interface to user service

This commit is contained in:
Abhinav-grd 2021-02-16 17:15:06 +05:30
parent 4bbfb61f56
commit 0989d794d5
3 changed files with 8 additions and 6 deletions

View file

@ -1,12 +1,13 @@
import { getEndpoint } from 'utils/common/apiUtil'; import { getEndpoint } from 'utils/common/apiUtil';
import { getData, LS_KEYS } from 'utils/storage/localStorage'; import { getData, LS_KEYS } from 'utils/storage/localStorage';
import { file, user, getFiles } from './fileService'; import { file } from './fileService';
import localForage from 'localforage'; import localForage from 'localforage';
import HTTPService from './HTTPService'; import HTTPService from './HTTPService';
import * as Comlink from 'comlink'; import * as Comlink from 'comlink';
import { B64EncryptionResult } from './uploadService'; import { B64EncryptionResult } from './uploadService';
import { getActualKey, getToken } from 'utils/common/key'; import { getActualKey, getToken } from 'utils/common/key';
import { user } from './userService';
const CryptoWorker: any = const CryptoWorker: any =
typeof window !== 'undefined' && typeof window !== 'undefined' &&

View file

@ -25,11 +25,6 @@ export interface fileAttribute {
fileType: number; fileType: number;
} }
export interface user {
id: number;
name: string;
email: string;
}
export interface file { export interface file {
id: number; id: number;

View file

@ -4,6 +4,12 @@ import { getEndpoint } from 'utils/common/apiUtil';
const ENDPOINT = getEndpoint(); const ENDPOINT = getEndpoint();
export interface user {
id: number;
name: string;
email: string;
}
export const getOtt = (email: string) => { export const getOtt = (email: string) => {
return HTTPService.get(`${ENDPOINT}/users/ott`, { return HTTPService.get(`${ENDPOINT}/users/ott`, {
email: email, email: email,