This commit is contained in:
2021-08-13 15:29:41 +08:00
parent 22c11fca68
commit 68bbc90920
2 changed files with 7 additions and 7 deletions
+6 -7
View File
@@ -6,7 +6,6 @@ namespace HttpServer\Route;
use Annotation\Aspect;
use Annotation\Route\RpcProducer;
use Closure;
use Exception;
use HttpServer\Exception\RequestException;
@@ -80,12 +79,12 @@ class Node
*/
public function unpack(string $data): mixed
{
if ($this->_dataType == RpcProducer::PROTOCOL_JSON) {
return json_decode($data, true);
}
if ($this->_dataType == RpcProducer::PROTOCOL_SERIALIZE) {
return unserialize($data);
}
// if ($this->_dataType == RpcProducer::PROTOCOL_JSON) {
// return json_decode($data, true);
// }
// if ($this->_dataType == RpcProducer::PROTOCOL_SERIALIZE) {
// return unserialize($data);
// }
return $data;
}