Skip to content

Commit f7fcb76

Browse files
committed
fix: api changes
1 parent d98fea8 commit f7fcb76

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

cmd/scraper.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"encoding/json"
66
"errors"
7-
"fmt"
87
"github.com/r3labs/diff/v3"
98
log "github.com/sirupsen/logrus"
109
"github.com/spf13/cobra"
@@ -146,7 +145,6 @@ func (s *ScraperCommand) runScraper() error {
146145
n := &notifier.ApiGrade{
147146
Course: grade.Course,
148147
Class: s.findClass(grade, classes),
149-
Year: uint32(year),
150148
Name: grade.Description,
151149
Mean: float32(nmean),
152150
}
@@ -274,7 +272,7 @@ func (s *ScraperCommand) findClass(grade *scraperGrade, classes []string) string
274272
continue
275273
}
276274

277-
return fmt.Sprintf("%s-%s", grade.Course, className)
275+
return className
278276
}
279277

280278
return grade.Course

notifier/types.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package notifier
33
type ApiGrade struct {
44
Course string `json:"course"`
55
Class string `json:"class"`
6-
Year uint32 `json:"year"`
76
Name string `json:"name"`
87
Mean float32 `json:"class_average"`
98
}

0 commit comments

Comments
 (0)