Commit b28814b0 authored by jan.koester's avatar jan.koester
Browse files

fixes

parent 998a71a8
Loading
Loading
Loading
Loading
Loading
+6 −4
Changes for src/api.cpp: 6 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ namespace authdb {
            class DomainData ddat(did.value);
            Domain dinf;
            size_t rdinf=sizeof(authdb::AuthHeader);
            dinf.info(*_Backend,ddat,rdinf);
            dinf.info(_Backend,ddat,rdinf);

            AuthBackend curback( ddat.getStorageType(),ddat.getStorageOptions(), ddat.getDomainName());

@@ -165,7 +165,7 @@ namespace authdb {
            return false;
        }

        Api(AuthBackend &admin,libhttppp::HttpRequest* curreq, const int tid, ULONG_PTR args){
        Api(AuthBackend &admin,libhttppp::HttpRequest* curreq, const int tid, ULONG_PTR args) : _Backend(admin) {
            libhttppp::HttpResponse rep;

            std::vector<char> recv;
@@ -193,9 +193,11 @@ namespace authdb {

            jresponse = json_object_new_array();

            char cdid[sizeof(uuid_t)];
            char cdid[sizeof(uuid_t)+1];
            sscanf(curreq->getRequestURL(),"/api/%[^/]",cdid);

            std::cout << "did: " << cdid << std::endl;

            uuid did(cdid);

            if(!clientLogin(did, jrequest,jresponse)){
@@ -221,7 +223,7 @@ namespace authdb {
        ~Api(){
        }
    private:
        AuthBackend *_Backend;
        AuthBackend &_Backend;
    };
};