WebAPP Exam 2025
This commit is contained in:
18
server/test.js
Normal file
18
server/test.js
Normal file
@ -0,0 +1,18 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user