save
This commit is contained in:
@@ -26,7 +26,7 @@ func httpHandler(w http.ResponseWriter, r *http.Request) {
|
||||
route = r.URL.Path
|
||||
|
||||
if strings.HasPrefix(route, "/archive") {
|
||||
err = readArchive(w, route)
|
||||
err = readArchive(w, route, HTTP)
|
||||
} else {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
w.Write([]byte(`<html>
|
||||
@@ -49,7 +49,7 @@ func httpHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var data []byte
|
||||
if strings.HasSuffix(route, ".lua") {
|
||||
data, err = render(route, reqData{path: r.URL.Path, params: params}, &Sets)
|
||||
data, err = render(route, reqData{path: r.URL.Path, params: params}, HTTP)
|
||||
} else if strings.HasSuffix(route, ".md") {
|
||||
data, err = os.ReadFile(route)
|
||||
data = []byte(markdownToHTML(string(data)))
|
||||
|
||||
Reference in New Issue
Block a user