31 lines
788 B
JavaScript
31 lines
788 B
JavaScript
const log = require('color-logs')(true, true, "Articles.class.js"),
|
|
fs = require("fs");
|
|
|
|
|
|
class Articles {
|
|
|
|
constructor(r, rtdbConn){
|
|
this.rdbConn = rtdbConn;
|
|
this.db = r;
|
|
}
|
|
|
|
listHome(callback) {
|
|
// r.db("dryusdan").table("articles").filter(r.row('time')).filter(r.row('title')).limit(1) get article mis en avant !
|
|
// r.db("dryusdan").table("articles").filter(r.row('time')).limit(9)
|
|
|
|
this.db.table('articles').fil.run(this.rdbConn, function(err, cursor){
|
|
if(err) throw err;
|
|
cursor.toArray(function(err, result){
|
|
if(err) throw err;
|
|
callback(result);
|
|
});
|
|
});
|
|
}
|
|
|
|
list(ctg, callback){
|
|
|
|
}
|
|
}
|
|
|
|
module.exports = Articles;
|