1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-30 07:03:00 +00:00
Files
TiddlyWiki5/core/modules/server/routes/get-status.js
2018-06-23 09:28:59 +01:00

32 lines
568 B
JavaScript

/*\
title: $:/core/modules/server/routes/get-status.js
type: application/javascript
module-type: route
GET /status
\*/
(function() {
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.method = "GET";
exports.path = /^\/status$/;
exports.handler = function(request,response,state) {
response.writeHead(200, {"Content-Type": "application/json"});
var text = JSON.stringify({
username: state.authenticatedUsername,
space: {
recipe: "default"
},
tiddlywiki_version: $tw.version
});
response.end(text,"utf8");
};
}());