SoylentNews / rehash

Forked from Slashcode, rehash is the codebase that powers SoylentNews.org, powered by mod_perl 2
http://soylentnews.org
GNU General Public License v2.0
57 stars 26 forks source link

Inconsistent Journal API information #473

Closed AnAccountForReportingBugs closed 5 years ago

AnAccountForReportingBugs commented 5 years ago

The information provided by the two journal methods is inconsistent. For example, https://soylentnews.org/api.pl?m=journal&op=latest&limit=1 currently returns an array with a single journal entry with the following info:

[
   {
      "introtext" : "<snip>",
      "discussion" : 34044,
      "last_update" : "2019-10-09 16:38:22",
      "description" : "1st Time Billionaires Paid Lower Tax Rate than Working Class",
      "artice" : "<snip>",
      "date" : "2019-10-09 16:36:26",
      "uid" : "1380",
      "posttype" : 1,
      "nickname" : "DeathMonkey",
      "promotetype" : "publish",
      "id" : "4657",
      "tid" : 6,
      "link" : "https://soylentnews.org/~DeathMonkey/journal/4657"
   }
]

However, https://soylentnews.org/api.pl?m=journal&op=single&id=4657 gives the following:

{
   "posttype" : 1,
   "uid" : 1380,
   "article" : "<snip>",
   "promotetype" : "publish",
   "id" : 4657,
   "tid" : 6,
   "introtext" : "<snip>",
   "discussion" : 34044,
   "last_update" : "2019-10-09 16:38:22",
   "description" : "1st Time Billionaires Paid Lower Tax Rate than Working Class",
   "date" : "2019-10-09 16:36:26"
}

In addition to "article" being misspelled, latest provides the link and the nickname for each entry.