return NotFound if no property key is provided

This commit is contained in:
Peter Morton 2023-10-16 21:51:15 -05:00
parent 7d6d218e08
commit 4973a80f64

View File

@ -20,6 +20,16 @@ router.get("/", async (req, res, next) => {
const propertyName = req.query.propertyName;
const { host, tenant, token } = auth;
logger.debug(`tps GET ${propertyName} from ${host}`);
if (!propertyName || propertyName.length == 0) {
next(
new createHttpError.NotFound(
`Blank property keys not allowed`
)
);
return;
}
axios
.get(
`${host}/tenant-properties-service/${tenant}/properties?q=${propertyName}`,