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

@ -136,7 +136,28 @@
"type": "text" "type": "text"
} }
} }
},
"PUT 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"
},
"message": {
"description": "message a publier",
"type": "text",
"optional": false
} }
}
}
}, },
"RESTexample": { "RESTexample": {