Fixed base path (again again again) and rewrote .env
This commit is contained in:
@@ -102,7 +102,7 @@ func articlePost(w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
articleSummary.Tags = []string{}
|
||||
}
|
||||
articleSummary.Link = "/" + path.Join(config.Prefix, "article", url.PathEscape(articleSummary.Link))
|
||||
articleSummary.Link = path.Join(config.Path, "article", url.PathEscape(articleSummary.Link))
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
json.NewEncoder(w).Encode(articleSummary)
|
||||
@@ -216,7 +216,7 @@ func articlePatch(w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
articleSummary.Tags = []string{}
|
||||
}
|
||||
articleSummary.Link = "/" + path.Join(config.Prefix, "article", url.PathEscape(articleSummary.Link))
|
||||
articleSummary.Link = path.Join(config.Path, "article", url.PathEscape(articleSummary.Link))
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
json.NewEncoder(w).Encode(articleSummary)
|
||||
|
||||
Reference in New Issue
Block a user