moved user interface to user service
This commit is contained in:
parent
4bbfb61f56
commit
0989d794d5
|
@ -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' &&
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue