Refactor dbTester et dbUtils pour utiliser la nouvelle structure de gestion des projets
This commit is contained in:
@@ -3,16 +3,15 @@ const databaseUtils = require('../utils/dbUtils');
|
||||
console.log('Testing database functions...');
|
||||
|
||||
async function printProjects() {
|
||||
const projects = await databaseUtils.getProjects();
|
||||
const projects = await databaseUtils.projectsTable.getAll();
|
||||
console.log('Projects:', projects);
|
||||
}
|
||||
|
||||
async function testCreateDestroyProject() {
|
||||
const project = await databaseUtils.createProject('Test project', 'Test description', new Date(), 0);
|
||||
console.log('Project created:', project);
|
||||
|
||||
await databaseUtils.deleteProject(project.id);
|
||||
console.log('Project deleted');
|
||||
const project = await databaseUtils.projectsTable.create('Test Project', 'This is a test project', new Date(), 0);
|
||||
console.log('Created project:', project);
|
||||
await databaseUtils.projectsTable.delete(project.id);
|
||||
console.log('Deleted project:', project);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user