Function backend::routes::trending::select_trending [−][src]
pub async fn select_trending(
pg_con: &DatabaseConnection,
kv_conn: &mut Connection
) -> Result<String, String>
Expand description
Generate Trending
Get trending from database and store it to redis
Parameters
DatabaseConnection
: Postgres connectionredis::aio::Connection
: Redis connection
Returns
String
: Json string of posts
Errors
String
: Database error message