Téléverser les fichiers vers "/"
This commit is contained in:
31
main.cpp
Normal file
31
main.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include <iostream>
|
||||
#include "database/Database.h"
|
||||
#include "services/AuthService.h"
|
||||
#include "services/ExportService.h"
|
||||
|
||||
int main() {
|
||||
Database db;
|
||||
db.connect("localhost", "root", "password", "studentdb");
|
||||
|
||||
std::string username;
|
||||
std::string password;
|
||||
|
||||
std::cout << "Username: ";
|
||||
std::cin >> username;
|
||||
std::cout << "Password: ";
|
||||
std::cin >> password;
|
||||
|
||||
User* user = AuthService::login(db, username, password);
|
||||
|
||||
if (user) {
|
||||
std::cout << "\nConnexion réussie.\n";
|
||||
user->displayMenu();
|
||||
|
||||
ExportService::exportData(user);
|
||||
} else {
|
||||
std::cout << "Connexion échouée.\n";
|
||||
}
|
||||
|
||||
db.disconnect();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user