- * Handles user logins.
- * @param context The context to work in
- * @param params User specified parameters
- */
-static void LoginHandler(FCGIContext *context, char *params) {
- const char *key, *value;
- bool force = 0, end = 0;
-
- while ((params = FCGI_KeyPair(params, &key, &value))) {
- if (!strcmp(key, "force"))
- force = !force;
- else if (!strcmp(key, "end"))
- end = !end;
- }
-
- if (end) {
- *(context->login_key) = 0;
- FCGI_BeginJSON(context, STATUS_OK);
- FCGI_EndJSON();
- return;
- }
+ * Identifies current version info. Useful for testing that the API is running.
+ * TODO - Consider adding info about available sensors and actuators (eg capabilities)?
+ */
+static void IdentifyHandler(FCGIContext *context, char *params) {
+ FCGI_BeginJSON(context, STATUS_OK);
+ FCGI_JSONPair("description", "MCTX3420 Server API (2013)");
+ FCGI_JSONPair("build_date", __DATE__ " " __TIME__);
+ FCGI_EndJSON();
+}