diff --git a/frontend/services/etrade.ts b/frontend/services/etrade.ts index bc9b6228..5f8db0b6 100644 --- a/frontend/services/etrade.ts +++ b/frontend/services/etrade.ts @@ -1,4 +1,4 @@ -import { Redirect, UserPortfolio } from '../types/types'; +import { Redirect, TokenStatus, UserPortfolio } from '../types/types'; import axios, { AxiosResponse, HttpStatusCode } from 'axios'; import { API_LINK } from './CommonDocs'; @@ -9,6 +9,14 @@ export const getCallbackUrl = async (id: string): Promise => { return response.data; }; + +export const getTokenStatus = async (id: string): Promise => { + const response: AxiosResponse = await axios.get( + `http://${API_LINK}/etrade/status/${id}`, + ); + return response.data; +}; + export const verifyToken = async ( id: string, verifier: string, diff --git a/frontend/services/users.ts b/frontend/services/users.ts index 895c0c27..174a5c34 100644 --- a/frontend/services/users.ts +++ b/frontend/services/users.ts @@ -1,6 +1,6 @@ import axios, { AxiosResponse } from 'axios'; import { API_LINK } from './CommonDocs'; -import { FinancialGoal, TokenStatus, User } from '../types/types'; +import { FinancialGoal, User } from '../types/types'; export const getAllUsers = async (): Promise => { console.log(API_LINK); @@ -11,13 +11,6 @@ export const getAllUsers = async (): Promise => { return response.data; }; -export const getTokenStatus = async (id: number): Promise => { - const response: AxiosResponse = await axios.get( - `http://${API_LINK}/etrade/status/${id}`, - ); - return response.data; -}; - export const registerUser = async ( user: User, shortTermGoals: Array,