fume-fhir-converter
Version:
FHIR-Utilized Mapping Engine - Community
18 lines (13 loc) • 464 B
text/typescript
/**
* © Copyright Outburn Ltd. 2022-2024 All Rights Reserved
* Project name: FUME-COMMUNITY
*/
import express from 'express';
import config from '../config';
const serverConfig = config.getServerConfig();
export const failOnStateless = (req: express.Request, res: express.Response, next: express.NextFunction) => {
if (serverConfig.SERVER_STATELESS) {
res.status(405).json({ message: 'Endpoint unavailable without FHIR server' });
}
next();
};