Suggestion to Add Review Timestamp to Utopian API

in #utopian-io7 years ago (edited)

This was triggered by @crokkon's post here.

Components

This author dug through the codes of the Utopian API to figure out which component this pertains to and found that the affected model is PostSchema.

The files is located in src\server\models\post.model.ts.

Another is the post controller src\server\controllers\post.controller\index.ts.

The target function is:

async function update(req, res, next) {
  ...
}

Proposal

This author suggested to add the date and time when a contribution was reviewed (approved or rejected) to the component mentioned above and include that information as the output of the API.

This author confirmed with @samrg472 thru discord that the review date audit information is not outputted by the current API.

Mockups / Examples

Using the previous version of the API (limit to 1 record for demonstration purposes):
https://api.utopian.io/api/posts/?limit=1&skip=0&section=all&sortBy=created&type=all

It did not output any information relating to the time the contribution was reviewed (approved or rejected).

For the result of the API call above, the data this author is particularly interested was this:

         "json_metadata": {
            "moderator": {
               "flagged": false,
               "pending": false,
               "reviewed": true,
               "time": "2018-01-13T00:17:27.501Z",
               "account": "hsynterkr"
            },

On this author's previous analysis, the time field did not exist yet.

Benefits

The objective of writing this suggestion was to increase transparency in the Utopian platform.

The benefit this author perceived of adding this information is mainly on the analysis side of it. Data analysts can dig through the records and get information on the speed of how long the reviews take. This information can then be shared publicly so that the community of contributors can have properly set expectation.

However, in the process of doing this suggestion, this author discovered that the moderator time information has already been implemented 6 hours ago.

image.png

I would like to request the moderator to consider it as a valid suggestion given that it was already in this author's intention to write a suggestion about it, but only got the time to do so now.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hello @eastmael, Thanks for making such a nice suggestion. But it would not make sense to approve this since the feature has already been implemented.
Also, your contribution is not formal considering your last paragraph.
Thank you.

[utopian-moderator]

Okay. Yeah, i'll just skip this contribution. Thanks anyways.

Thanks bro!

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63438.65
ETH 2632.46
USDT 1.00
SBD 2.75