mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Remove extra column from users table (HSTORE field)
Migrated key/value pairs to specific columns.
This commit is contained in:
parent
ae74f94655
commit
83f3ccab0e
19 changed files with 256 additions and 141 deletions
|
@ -18,22 +18,17 @@ func (h *handler) showStylesheet(w http.ResponseWriter, r *http.Request) {
|
|||
filename := request.RouteStringParam(r, "name")
|
||||
if filename == "custom_css" {
|
||||
user, err := h.store.UserByID(request.UserID(r))
|
||||
if err != nil {
|
||||
if err != nil || user == nil {
|
||||
html.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
b := response.New(w, r)
|
||||
if user == nil {
|
||||
b.WithHeader("Content-Type", "text/css; charset=utf-8")
|
||||
b.WithBody("")
|
||||
b.Write()
|
||||
return
|
||||
}
|
||||
b.WithHeader("Content-Type", "text/css; charset=utf-8")
|
||||
b.WithBody(user.Extra["custom_css"])
|
||||
b.WithBody(user.Stylesheet)
|
||||
b.Write()
|
||||
return
|
||||
}
|
||||
|
||||
etag, found := static.StylesheetsChecksums[filename]
|
||||
if !found {
|
||||
html.NotFound(w, r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue