afb-api-js: first step for javascript bindings
[src/app-framework-binder.git] / src / main-afb-daemon.c
index 3421be8..2b61bd8 100644 (file)
@@ -47,6 +47,7 @@
 #   include "afb-api-dbus.h"
 #endif
 #include "afb-api-ws.h"
+#include "afb-api-js.h"
 #include "afb-hsrv.h"
 #include "afb-hreq.h"
 #include "afb-xreq.h"
@@ -659,8 +660,7 @@ static void startup_call_current(struct startup_req *sreq)
                json = strchr(verb, ':');
                if (json) {
                        afb_xreq_init(&sreq->xreq, &startup_xreq_itf);
-                       afb_context_init(&sreq->xreq.context, sreq->session, NULL);
-                       sreq->xreq.context.validated = 1;
+                       afb_context_init_validated(&sreq->xreq.context, sreq->session);
                        sreq->api = strndup(api, verb - api);
                        sreq->verb = strndup(verb + 1, json - verb - 1);
                        sreq->xreq.request.called_api = sreq->api;
@@ -855,6 +855,7 @@ static void start(int signum, void *arg)
        apiset_start_list("weak-ldpaths", afb_api_so_add_pathset_nofails, "the weak binding path set");
 #endif
        apiset_start_list("auto-api", afb_autoset_add_any, "the automatic api path set");
+       apiset_start_list("jsapi", afb_api_js_add, "the jsapi");
 #if WITH_DBUS_TRANSPARENCY
        apiset_start_list("dbus-client", afb_api_dbus_add_client, "the afb-dbus client");
 #endif