Skip to content

Commit

Permalink
fix: api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lutonite committed Feb 26, 2024
1 parent d98fea8 commit f7fcb76
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions cmd/scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"github.com/r3labs/diff/v3"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -146,7 +145,6 @@ func (s *ScraperCommand) runScraper() error {
n := &notifier.ApiGrade{
Course: grade.Course,
Class: s.findClass(grade, classes),
Year: uint32(year),
Name: grade.Description,
Mean: float32(nmean),
}
Expand Down Expand Up @@ -274,7 +272,7 @@ func (s *ScraperCommand) findClass(grade *scraperGrade, classes []string) string
continue
}

return fmt.Sprintf("%s-%s", grade.Course, className)
return className
}

return grade.Course
Expand Down
1 change: 0 additions & 1 deletion notifier/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package notifier
type ApiGrade struct {
Course string `json:"course"`
Class string `json:"class"`
Year uint32 `json:"year"`
Name string `json:"name"`
Mean float32 `json:"class_average"`
}

0 comments on commit f7fcb76

Please sign in to comment.