This commit is contained in:
SeekDaSky 2017-12-08 00:43:58 +01:00
parent 94ad405dee
commit a297a89287
2 changed files with 40 additions and 0 deletions

View File

@ -54,4 +54,23 @@ class message
//TODO: tout poster dans la BDD //TODO: tout poster dans la BDD
} }
public function PUT_emergency($argv){
extract($argv);
$wsi = new wsinterop("localhost",9998);
$wsi->send([
"operation" => "UpdMessage",
"id" => $id,
"message" => $message,
"channelType" => "Emergency",
"channelName" => is_null($URL_0) ? "" : "$URL_0"
]);
$wsi->close();
return ["sent" => true];
//TODO: tout poster dans la BDD
}
} }

View File

@ -123,6 +123,21 @@
} }
}, },
"DELETE emergency": { "DELETE emergency": {
"description": "",
"permissions": [],
"parameters": {
"URL_0": {
"description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast",
"type": "numeric",
"optional": true
},
"id": {
"description": "message a publier",
"type": "text"
}
}
},
"PUT emergency": {
"description" : "", "description" : "",
"permissions": [], "permissions": [],
"parameters": { "parameters": {
@ -134,9 +149,15 @@
"id": { "id": {
"description": "message a publier", "description": "message a publier",
"type": "text" "type": "text"
},
"message": {
"description": "message a publier",
"type": "text",
"optional": false
} }
} }
} }
}, },
"RESTexample": { "RESTexample": {