changing paste read output for API refactoring

This commit is contained in:
El RIDO
2015-10-18 11:08:28 +02:00
parent b92b38cee8
commit f21567133c
7 changed files with 74 additions and 36 deletions

View File

@@ -339,9 +339,7 @@ class zerobin
$paste = $this->_model->getPaste($dataid);
if ($paste->exists())
{
// The paste itself is the first in the list of encrypted messages.
$messages = array_merge(array($paste->get()), $paste->getComments());
$this->_data = json_encode($messages);
$this->_data = json_encode($paste->get());
}
else
{
@@ -359,7 +357,7 @@ class zerobin
}
else
{
$this->_return_message(0, $dataid, array('messages' => $messages));
$this->_return_message(0, $dataid, json_decode($this->_data, true));
}
}
}