switching to full JSON API without POST array use, ensure all JSON operations are done with error detection

This commit is contained in:
El RIDO
2019-05-13 22:31:52 +02:00
parent be1e7babc0
commit cc1c55129f
14 changed files with 187 additions and 103 deletions

View File

@@ -166,12 +166,9 @@ class Helper
* @param array $meta
* @return array
*/
public static function getPastePostJson($version = 2, array $meta = array())
public static function getPasteJson($version = 2, array $meta = array())
{
$example = self::getPastePost($version, $meta);
$example['adata'] = json_encode($example['adata']);
$example['meta'] = json_encode($example['meta']);
return $example;
return json_encode(self::getPastePost($version, $meta));
}
/**
@@ -223,11 +220,9 @@ class Helper
* @param int $version
* @return array
*/
public static function getCommentPostJson()
public static function getCommentJson()
{
$example = self::getCommentPost();
$example['adata'] = json_encode($example['adata']);
return $example;
return json_encode(self::getCommentPost());
}
/**