Remove time
arg from addevent, date
should contain both
This commit is contained in:
parent
4e123691d5
commit
6958240e3d
@ -26,9 +26,6 @@ if (!$user->hasPermission("MACHINEMANAGER_EDIT") && !$user->hasPermission("MACHI
|
|||||||
if (empty($VARS["date"]) || (bool)strtotime($VARS["date"]) !== true) {
|
if (empty($VARS["date"]) || (bool)strtotime($VARS["date"]) !== true) {
|
||||||
sendJsonResp("Invalid or missing event date.", "ERROR");
|
sendJsonResp("Invalid or missing event date.", "ERROR");
|
||||||
}
|
}
|
||||||
if (empty($VARS["time"]) || (bool)strtotime($VARS["time"]) !== true) {
|
|
||||||
sendJsonResp("Invalid or missing event time.", "ERROR");
|
|
||||||
}
|
|
||||||
if (empty($VARS["event"])) {
|
if (empty($VARS["event"])) {
|
||||||
sendJsonResp("Invalid or missing event type.", "ERROR");
|
sendJsonResp("Invalid or missing event type.", "ERROR");
|
||||||
}
|
}
|
||||||
@ -37,7 +34,7 @@ $evt = Event::create(
|
|||||||
$VARS['id'],
|
$VARS['id'],
|
||||||
date(
|
date(
|
||||||
"Y-m-d H:i:s",
|
"Y-m-d H:i:s",
|
||||||
strtotime($VARS['date'] . " " . $VARS['time'])
|
strtotime($VARS['date'])
|
||||||
),
|
),
|
||||||
$VARS['event'],
|
$VARS['event'],
|
||||||
$user->getUID(),
|
$user->getUID(),
|
||||||
|
@ -54,7 +54,6 @@ $APIS = [
|
|||||||
"vars" => [
|
"vars" => [
|
||||||
"id" => "/^[0-9a-z]+$/",
|
"id" => "/^[0-9a-z]+$/",
|
||||||
"date" => "string",
|
"date" => "string",
|
||||||
"time" => "string",
|
|
||||||
"event" => "string",
|
"event" => "string",
|
||||||
"publicnotes (optional)" => "string",
|
"publicnotes (optional)" => "string",
|
||||||
"privatenotes (optional)" => "string"
|
"privatenotes (optional)" => "string"
|
||||||
@ -63,7 +62,7 @@ $APIS = [
|
|||||||
"geteventtypes" => [
|
"geteventtypes" => [
|
||||||
"load" => "geteventtypes.php",
|
"load" => "geteventtypes.php",
|
||||||
"vars" => [
|
"vars" => [
|
||||||
|
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user