controllers/projects: cache HTML instead of markdown

This commit is contained in:
Christine Dodrill 2015-02-08 08:55:10 -08:00
parent 3746e2b8cc
commit d69a1ef383
1 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class Projects extends lapis.Application
@title = "Readme for #{@params.name}" @title = "Readme for #{@params.name}"
@name = @params.name @name = @params.name
@ret, @err = oleg.get "readmes", @params.name @doc, @err = oleg.get "readmes", @params.name
if @err if @err
ngx.log ngx.NOTICE, "Need to download readme for #{@params.name}" ngx.log ngx.NOTICE, "Need to download readme for #{@params.name}"
@ -28,13 +28,13 @@ class Projects extends lapis.Application
if code == 404 if code == 404
return render: "notfound", status_code: 404 return render: "notfound", status_code: 404
oleg.set "readmes", @params.name, readme @doc = discount readme, "toc", "nopants", "autolink"
oleg.set "readmes", @params.name, @doc
@ret = readme @ret = readme
elseif @err elseif @err
@err = "OlegDB returned code #{@err}." @err = "OlegDB returned code #{@err}."
return render: "error", status_code: 500 return render: "error", status_code: 500
@doc = discount @ret, "toc", "nopants", "autolink"
render: true render: true