Added auth to endpoints
This commit is contained in:
@@ -5,10 +5,10 @@ const servicePort = process.env.SERVICE_PORT || 5000;
|
||||
|
||||
export async function getRequest(
|
||||
url: string,
|
||||
params: AxiosRequestConfig<any>
|
||||
config?: AxiosRequestConfig<any>
|
||||
): Promise<AxiosResponse<any, any> | undefined> {
|
||||
const response = await axios
|
||||
.get(`${serviceHost}:${servicePort}/${url}`, { params })
|
||||
.get(`${serviceHost}:${servicePort}/${url}`, config)
|
||||
.catch((error) => console.error(error));
|
||||
return response || undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user