mirror of
https://github.com/ordinary-dev/phoenix
synced 2024-09-20 03:40:29 +05:00
Ivan R.
5aa2cee5b1
Since I started simplifying, I decided to abandon ORM. I won’t say that this makes much sense, everything works more or less as before. Except that the size of the program has decreased slightly again, by about a megabyte.
21 lines
371 B
Go
21 lines
371 B
Go
package pages
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/ordinary-dev/phoenix/database"
|
|
)
|
|
|
|
func ShowSettings(w http.ResponseWriter, _ *http.Request) {
|
|
groups, err := database.GetGroupsWithLinks()
|
|
if err != nil {
|
|
ShowError(w, http.StatusInternalServerError, err)
|
|
return
|
|
}
|
|
|
|
Render("settings.html.tmpl", w, map[string]any{
|
|
"title": "Settings",
|
|
"groups": groups,
|
|
})
|
|
}
|