Loading src/authdb.cpp +8 −0 Changes for src/authdb.cpp: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -381,6 +381,7 @@ namespace authdb { } editrec.append(curec); delete[] curec.Data->data; } } Loading Loading @@ -444,6 +445,7 @@ namespace authdb { } void AdminController(libhttppp::HttpRequest *curreq, const int tid, ULONG_PTR args){ try { if(strncmp(curreq->getRequestURL(),"/admin/listusers",16)==0){ listUsers(curreq,tid,args); }else if(strncmp(curreq->getRequestURL(),"/admin/createuser",17)==0){ Loading @@ -464,6 +466,12 @@ namespace authdb { rep.setContentLength(out.size()); rep.send(curreq,out.c_str(),out.size()); } }catch(AuthBackendError &e){ libhttppp::HttpResponse rep; rep.setState(HTTP500); rep.setContentType("text/html"); rep.send(curreq,e.what(),strlen(e.what())); } } void RequestEvent(libhttppp::HttpRequest *curreq, const int tid, ULONG_PTR args){ Loading Loading
src/authdb.cpp +8 −0 Changes for src/authdb.cpp: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -381,6 +381,7 @@ namespace authdb { } editrec.append(curec); delete[] curec.Data->data; } } Loading Loading @@ -444,6 +445,7 @@ namespace authdb { } void AdminController(libhttppp::HttpRequest *curreq, const int tid, ULONG_PTR args){ try { if(strncmp(curreq->getRequestURL(),"/admin/listusers",16)==0){ listUsers(curreq,tid,args); }else if(strncmp(curreq->getRequestURL(),"/admin/createuser",17)==0){ Loading @@ -464,6 +466,12 @@ namespace authdb { rep.setContentLength(out.size()); rep.send(curreq,out.c_str(),out.size()); } }catch(AuthBackendError &e){ libhttppp::HttpResponse rep; rep.setState(HTTP500); rep.setContentType("text/html"); rep.send(curreq,e.what(),strlen(e.what())); } } void RequestEvent(libhttppp::HttpRequest *curreq, const int tid, ULONG_PTR args){ Loading