WebAPP Exam 2025

This commit is contained in:
2025-06-28 18:31:48 +02:00
commit 0e9ec24d94
42 changed files with 7546 additions and 0 deletions

18
server/test.js Normal file
View 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);