mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Remove axios dependency
We can use the Node.js Fetch API directly instead of relying on an external dependency.
This commit is contained in:
@@ -25,7 +25,6 @@ import * as ejs from 'ejs';
|
||||
import * as compression from 'compression';
|
||||
import expressStaticGzip from 'express-static-gzip';
|
||||
/* eslint-enable import/no-namespace */
|
||||
import axios from 'axios';
|
||||
import LRU from 'lru-cache';
|
||||
import { isbot } from 'isbot';
|
||||
import { createCertificate } from 'pem';
|
||||
@@ -648,9 +647,9 @@ function isExcludedFromSsr(path: string, excludePathPattern: SsrExcludePatterns[
|
||||
*/
|
||||
function healthCheck(req, res) {
|
||||
const baseUrl = `${REST_BASE_URL}${environment.actuators.endpointPath}`;
|
||||
axios.get(baseUrl)
|
||||
fetch(baseUrl)
|
||||
.then((response) => {
|
||||
res.status(response.status).send(response.data);
|
||||
res.status(response.status).send(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(error.response.status).send({
|
||||
|
Reference in New Issue
Block a user