tiny 88x31 lexicon for atproto
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

yeah i reallyyyyy should sleep zzzz

+3 -3
+1 -1
cmd/main.go
··· 22 22 if err != nil { 23 23 log.Fatal(err) 24 24 } 25 - h := handler.MakeHandler(svc) 25 + h := handler.MakeHandler(store, svc) 26 26 log.Fatal(http.ListenAndServe(":8081", h.Serve())) 27 27 }
+2 -2
handler/handler.go
··· 24 24 var logoutT = template.Must(template.ParseFiles("./tmpl/base.html", "./tmpl/logout.html")) 25 25 var uploadT = template.Must(template.ParseFiles("./tmpl/base.html", "./tmpl/upload.html")) 26 26 27 - func MakeHandler(oauth *myoauth.Service) *Handler { 27 + func MakeHandler(db *db.Store, oauth *myoauth.Service) *Handler { 28 28 mux := http.NewServeMux() 29 29 sessionStore := sessions.NewCookieStore([]byte(os.Getenv("SESSION_KEY"))) 30 - h := &Handler{router: mux, oauth: oauth, sessionStore: sessionStore} 30 + h := &Handler{db: db, router: mux, oauth: oauth, sessionStore: sessionStore} 31 31 mux.HandleFunc("GET /", h.oauthMiddleware(h.gethome)) 32 32 mux.HandleFunc("GET /login", h.oauthMiddleware(getlogin)) 33 33 mux.HandleFunc("POST /login", h.login)