Skip to content

Commit

Permalink
Merge pull request #26 from Leosten/feature/53902-2
Browse files Browse the repository at this point in the history
[FEATURE#53902] Ajout de route update_metas sur conversation-proxy v2
  • Loading branch information
Guillaume Dubost authored Jun 9, 2017
2 parents b2ab88b + 4ff0be6 commit 550a9bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/DumbMethodsProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function connect(Application $app)
//Dumb proxy for messages
$controllers->get("/conversations/{conversation}/messages/{message}", [$this, "loadMessage"]);
$controllers->get("/conversations/{conversation}/messages", [$this, "loadConversationMessages"]);
$controllers->put("/conversations/{conversation}/messages/{message}/update_metas", [$this, "updateMessageMetas"]);
$controllers->post("/conversations/{conversation}/messages", [$this, "writeMessage"]);

//Dumb proxy for views
Expand Down Expand Up @@ -64,6 +65,11 @@ public function loadConversationMessages(Application $app, Request $req)
return $this->fireRequest($app, $req);
}

public function updateMessageMetas(Application $app, Request $req)
{
return $this->fireRequest($app, $req);
}

public function writeMessage(Application $app, Request $req)
{
if (null === $req->request->get("content", null)) {
Expand Down

0 comments on commit 550a9bd

Please sign in to comment.