Renamed app folder; added default version URLs.
h3rald h3rald@h3rald.com
Sat, 04 Apr 2015 20:25:37 +0200
69 files changed,
10 insertions(+),
6 deletions(-)
jump to
M
app/js/modules/info.js
→
admin/js/modules/info.js
@@ -24,7 +24,7 @@ li("Read-Only", readonly),
li("Total Documents", m("span.badge", info.total_documents)), li("Total Tags", m("span.badge", info.total_tags)), ])]); - var logo = m(".col-md-6", [m("img", {src: "/v1/docs/app/images/litestore.png"})]); + var logo = m(".col-md-6", [m("img", {src: "images/litestore.png"})]); var taglist = m("ul.list-unstyled", info.tags.map(function(tag){ var key = Object.keys(tag)[0]; return m("li", [u.tagbutton(key, tag[key])]);
M
lib/cli.nim
→
lib/cli.nim
@@ -9,7 +9,7 @@ types,
utils const cfgfile = "litestore.nimble".slurp -const favicon = "app/favicon.ico".slurp +const favicon = "admin/favicon.ico".slurp var file*, address*, version*, appname*: string
M
lib/server.nim
→
lib/server.nim
@@ -31,6 +31,10 @@ result.headers = {"Content-Type": "image/x-icon"}.newStringTable
return result try: var info = req.parseApiUrl + if info.version == "docs" or info.version == "info": + info.version = "v1" + info.id = info.resource + info.resource = "docs" if info.version == "v1" and info.resource.match(peg"^docs / info$"): return api_v1.route(req, LS, info.resource, info.id) else:
M
lib/types.nim
→
lib/types.nim
@@ -60,7 +60,7 @@ ^[a-zA-Z0-9_\-?~:.@#^!+]+$
""" let PEG_URL* = peg""" - ^\/{(v\d+)} \/ {([^\/]+)} (\/ {(.+)} / \/?)$ + ^\/({(v\d+)} \/)? {([^\/]+)} (\/ {(.+)} / \/?)$ """ const
M
lib/utils.nim
→
lib/utils.nim
@@ -24,7 +24,7 @@ result = "SELECT "
if options.search.len > 0: if options.select[0] != "COUNT(id)": options.select.add("snippet(searchcontents) AS highlight") - options.select.add("rank(matchinfo(searchcontents, 'pcxnal'), 1.20, 0.75, 1.5, 0.5) AS rank") + options.select.add("rank(matchinfo(searchcontents, 'pcxnal'), 1.20, 0.75) AS rank") options.orderby = "rank DESC" result = result & options.select.join(", ") result = result & " FROM documents, searchcontents "