return NotFound if no property key is provided
This commit is contained in:
parent
7d6d218e08
commit
4973a80f64
@ -20,6 +20,16 @@ router.get("/", async (req, res, next) => {
|
|||||||
const propertyName = req.query.propertyName;
|
const propertyName = req.query.propertyName;
|
||||||
const { host, tenant, token } = auth;
|
const { host, tenant, token } = auth;
|
||||||
logger.debug(`tps GET ${propertyName} from ${host}`);
|
logger.debug(`tps GET ${propertyName} from ${host}`);
|
||||||
|
|
||||||
|
if (!propertyName || propertyName.length == 0) {
|
||||||
|
next(
|
||||||
|
new createHttpError.NotFound(
|
||||||
|
`Blank property keys not allowed`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
`${host}/tenant-properties-service/${tenant}/properties?q=${propertyName}`,
|
`${host}/tenant-properties-service/${tenant}/properties?q=${propertyName}`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user