Database Pool
This commit is contained in:
parent
59c1ffd027
commit
fe2fbb9ad0
23 changed files with 268 additions and 63 deletions
|
@ -32,7 +32,7 @@ void Handler::Login::handle(Request& request) {
|
|||
bool success = false;
|
||||
try {
|
||||
success = server->validatePassword(login, password);
|
||||
} catch (const DBInterface::NoLogin& e) {
|
||||
} catch (const DB::NoLogin& e) {
|
||||
std::cerr << "Exception on logging in:\n\t" << e.what() << std::endl;
|
||||
return error(request, Result::wrongCredentials, Response::Status::badRequest);
|
||||
} catch (const std::exception& e) {
|
||||
|
|
|
@ -35,7 +35,7 @@ void Handler::Register::handle(Request& request) {
|
|||
|
||||
try {
|
||||
server->registerAccount(login, password);
|
||||
} catch (const DBInterface::DuplicateLogin& e) {
|
||||
} catch (const DB::DuplicateLogin& e) {
|
||||
std::cerr << "Exception on registration:\n\t" << e.what() << std::endl;
|
||||
return error(request, Result::loginExists, Response::Status::conflict);
|
||||
} catch (const std::exception& e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue