Implémentation de l'interop pour la suppression de message (promis c'est le dernier commit sur master)

This commit is contained in:
SeekDaSky 2017-12-07 23:40:05 +01:00
parent 48f9be4f3c
commit e82f192f8e
2 changed files with 35 additions and 0 deletions

View File

@ -24,6 +24,26 @@ class message
"message" => $message, "message" => $message,
"username" => $username, "username" => $username,
"location" => $location, "location" => $location,
//TODO implémenter la récupération d'id depuis la bdd
"id" => uniqid(),
"channelType" => "Emergency",
"channelName" => is_null($URL_0) ? "" : "$URL_0"
]);
$wsi->close();
return ["sent" => true];
//TODO: tout poster dans la BDD
}
public function DELETE_emergency($argv){
extract($argv);
$wsi = new wsinterop("localhost",9998);
$wsi->send([
"operation" => "DelMessage",
"id" => $id,
"channelType" => "Emergency", "channelType" => "Emergency",
"channelName" => is_null($URL_0) ? "" : "$URL_0" "channelName" => is_null($URL_0) ? "" : "$URL_0"
]); ]);

View File

@ -107,6 +107,21 @@
"type": "array<numeric>" "type": "array<numeric>"
} }
} }
},
"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"
}
}
} }
}, },