Skip to content

Commit

Permalink
use registry.resolve for healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
zotya committed Mar 13, 2023
1 parent 491ce9f commit b9419f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/middleware/healthcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { registry } from '@eeacms/search';
export default function healthcheck(req, res, next) {
const { id } = req.params;
const appConfig = registry.searchui[id];
if (appConfig?.healthcheck) {
appConfig
.healthcheck(appConfig)
const hc = registry.resolve[appConfig?.healthcheck];
if (hc) {
hc(appConfig)
.then((body) => res.send(body))
.catch((body) => {
res.send({ error: body });
Expand Down

0 comments on commit b9419f2

Please sign in to comment.