diff --git a/internal/handler_auth.go b/internal/handler_auth.go index 56f87ef..4d4c739 100644 --- a/internal/handler_auth.go +++ b/internal/handler_auth.go @@ -51,7 +51,6 @@ func (cfg *BookclubServer) handlerLogin(w http.ResponseWriter, r *http.Request) //todo logging respondWithError(w, 400, "Unable to login user.") } - //todo return login response loginResponse := LoginResponse{Name: persistedUser.Name, Email: persistedUser.Email, Jwt: jwt} respondWithJSON(w, 200, loginResponse) } diff --git a/internal/repository.go b/internal/repository.go index b2276ff..e3d0ce2 100644 --- a/internal/repository.go +++ b/internal/repository.go @@ -102,7 +102,7 @@ func (r *PostgresLinkRepository) Get(senderId uint, receiverId uint) (Link, erro return link, nil } -func (r *PostgresLinkRepository) GetById(userId string) ([]Link, error) { //todo +func (r *PostgresLinkRepository) GetById(userId string) ([]Link, error) { var links []Link // Build the query with OR condition @@ -115,7 +115,7 @@ func (r *PostgresLinkRepository) GetById(userId string) ([]Link, error) { //todo return links, nil } -func (r *PostgresLinkRepository) GetAcceptedById(userId uint) ([]Link, error) { //todo +func (r *PostgresLinkRepository) GetAcceptedById(userId uint) ([]Link, error) { var links []Link // Build the query with OR condition