Files
2025-06-28 18:31:48 +02:00

19 lines
837 B
JavaScript

const forumDao = require('./dao-forum.js');
const crypto = require('crypto');
/*/forumDao.listPosts().then(console.log);
forumDao.listCommentsOfPost(1).then(console.log);
forumDao.getNumCommentsOfPost(1).then(console.log);
forumDao.getPost(1).then(console.log);
forumDao.getAuthorOfPost(1).then(console.log);*/
//forumDao.createPost({title: "Post Creato",authorid: 1, maxcomments: null, publication: "2023-03-02", text: "Testo post creato"}).then(console.log);
//forumDao.createComment({text: "Commento creato 2", publication:"2024-02-01",authorid: 1, postid: 1}).then(console.log);
//forumDao.listCommentsOfPost(1).then(console.log);
//forumDao.setInterestingComment(1,2).then(console.log);
//forumDao.deletePost(2).then(console.log)
//forumDao.deleteComment(2).then(console.log)
//forumDao.listCommentsOfPost(3).then(console.log);