#10 - user logged in middleware

This commit is contained in:
2025-03-11 15:00:59 +02:00
parent b7b7a7d55d
commit 5dfe911793
4 changed files with 18 additions and 18 deletions

View File

@@ -12,15 +12,11 @@ import (
"time"
)
func FollowFeedHandler(s *config.State, cmd config.Command) error {
func FollowFeedHandler(s *config.State, cmd config.Command, user database.User) error {
if len(cmd.Args) < 1 {
log.Fatal("usage: boot-dev-blog-aggregator follow URL")
}
ctx := context.Background()
user, err := s.DB.GetUser(ctx, s.Config.CurrentUserName)
if err != nil {
return err
}
url := cmd.Args[0]