Skip to content

Commit

Permalink
remove basic auth remnants
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmichels committed Jun 12, 2023
1 parent bb710cb commit d2d452a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/coursesense/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func main() {
port = "8080"
}

srv := server.NewServer(fmt.Sprintf(":%s", port), cfg.Auth.Username, cfg.Auth.Password, register, trigger)
srv := server.NewServer(fmt.Sprintf(":%s", port), register, trigger)
if err = srv.Start(ctx); err != nil {
log.Panicf("Server failure: %s", err)
}
Expand Down
4 changes: 0 additions & 4 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ type Config struct {
Password string `mapstructure:"password"`
From string `mapstructure:"from"`
}
Auth struct {
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
}
}

func ReadConfig() (Config, error) {
Expand Down
6 changes: 2 additions & 4 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ type Server struct {
registrationService coursesense.RegistrationService
triggerService coursesense.TriggerService
addr string
username string
password string
}

func NewServer(addr string, username, password string, r coursesense.RegistrationService, t coursesense.TriggerService) Server {
return Server{r, t, addr, username, password}
func NewServer(addr string, r coursesense.RegistrationService, t coursesense.TriggerService) Server {
return Server{r, t, addr}
}

func (s Server) Start(ctx context.Context) error {
Expand Down

0 comments on commit d2d452a

Please sign in to comment.