terrible no good massive refactor commit (oh yeah and built generic sessions for admin panel)
This commit is contained in:
parent
cee99a6932
commit
45f33b8b46
34 changed files with 740 additions and 654 deletions
|
@ -14,7 +14,7 @@ func serveRelease(app *model.AppState) http.Handler {
|
|||
slices := strings.Split(r.URL.Path[1:], "/")
|
||||
releaseID := slices[0]
|
||||
|
||||
account := r.Context().Value("account").(*model.Account)
|
||||
session := r.Context().Value("session").(*model.Session)
|
||||
|
||||
release, err := controller.GetRelease(app.DB, releaseID, true)
|
||||
if err != nil {
|
||||
|
@ -56,12 +56,12 @@ func serveRelease(app *model.AppState) http.Handler {
|
|||
}
|
||||
|
||||
type ReleaseResponse struct {
|
||||
Account *model.Account
|
||||
Session *model.Session
|
||||
Release *model.Release
|
||||
}
|
||||
|
||||
err = pages["release"].Execute(w, ReleaseResponse{
|
||||
Account: account,
|
||||
Session: session,
|
||||
Release: release,
|
||||
})
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue