fixes get message endpoint

This commit is contained in:
Prateek Banga
2023-09-21 21:49:40 +05:30
parent 06a05a3358
commit d63eaf3ef0
+1 -1
View File
@@ -1308,7 +1308,7 @@ App::get('/v1/messaging/messages/:id')
->inject('dbForProject')
->inject('response')
->action(function (string $id, Database $dbForProject, Response $response) {
$message = $dbForProject->getDocument('message', $id);
$message = $dbForProject->getDocument('messages', $id);
if ($message->isEmpty()) {
throw new Exception(Exception::MESSAGE_NOT_FOUND);