UWVA#52203 Flexwhere sensoren werken niet - alle reserveringen no show

svn path=/Website/branches/v2017.2/; revision=36924
This commit is contained in:
Jos Groot Lipman
2018-02-12 09:39:38 +00:00
parent 64158ffaf3
commit 649f0b2149

View File

@@ -157,8 +157,6 @@ api2_rest = {
}
var key = getQParamInt("id", -1); // Voor POST/PUT/DELETE
if (/PUT|DELETE/.test(method) && !(key > 0))
api2.error(400, "Missing id");
var jsondata = {};
var filter = shared.qs2json(model);
@@ -297,6 +295,8 @@ api2_rest = {
{
if (method == "DELETE")
{
if (!(key > 0))
api2.error(400, "Missing id");
var result = model["REST_" + method]( requestparams, key );
}
else if (filter.mode == "attachment")
@@ -387,6 +387,8 @@ api2_rest = {
}
else if (model.record_name in jsondata) // een enkel record
{
if (!(key > 0))
api2.error(400, "Missing id");
if (jsondata[model.record_name] instanceof Array)
api2.error(400, "{0} should be single record only.".format(method))