You could do this once:
server.on("/", commonFunction);
And store a function pointer that would be called from commonFunction(). It would point to either handle_AP_OnConnect() or handle_OnConnect()
You could do this once:
server.on("/", commonFunction);
And store a function pointer that would be called from commonFunction(). It would point to either handle_AP_OnConnect() or handle_OnConnect()