aqhome-cgi: started working on users module.

This commit is contained in:
Martin Preuss
2025-09-18 23:48:47 +02:00
parent 124e471364
commit 6b39e0bfb1
4 changed files with 342 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
#include "aqhome-cgi/service/module.h"
#include "aqhome-cgi/modules/common/mmodules.h"
#include "aqhome-cgi/modules/common/musers.h"
#include <gwenhywfar/debug.h>
#include <gwenhywfar/timestamp.h>
@@ -131,6 +132,24 @@ AQH_MODULE *_loadSubModule(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *sessio
return mSub;
}
}
else if (strcasecmp(sModuleName, "users")==0) {
AQH_MODULE *mSub;
mSub=AQH_Service_LoadModule(sv, sModuleName);
if (mSub) {
const char *s;
GWEN_BUFFER *nbuf;
nbuf=GWEN_Buffer_new(0, 256, 0, 1);
s=AQH_ModService_GetBaseFolder(m);
GWEN_Buffer_AppendArgs(nbuf, "%s/modules", s?s:".");
AQH_ModAdmUsers_Extend(mSub, AQH_ModService_GetService(m), GWEN_Buffer_GetStart(nbuf));
AQH_Module_Tree2_AddChild(m, mSub);
GWEN_Buffer_free(nbuf);
return mSub;
}
}
return NULL;
}