Skip to content

workshop content#13

Open
fadzilr1 wants to merge 1 commit intotherizk:masterfrom
fadzilr1:workshop
Open

workshop content#13
fadzilr1 wants to merge 1 commit intotherizk:masterfrom
fadzilr1:workshop

Conversation

@fadzilr1
Copy link

No description provided.

type NilaiSiswa struct {
NIM int64 `json:"nim" db:"nim"`
MapelID int64 `json:"mapel_id" db:"mapel_id"`
Nilai int64 `json:"nili" db:"nili"`
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo "nili"

return resp, errors.AddTrace(err)
}

detailSekolah, err := nilai.GetDetailSekolah(ctx, nilai.Sekolah[0])
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ini mungkin bisa ditaro diluar if karena bakal dipanggil di setiap condition

"github.com/tokopedia/tokopoints/tracer"
)

func GetNilaiSiswa(ctx context.Context, nim int64, sekolah, kelas string, mapel_id int64) (resp GetNilaiSiswaResponse, err error) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camelCase, "mapel_id" -> "mapelID"

}

resp = mappingGetNilaiSiswa(nilai, detailSekolah)
} else if sekolah != "semua" {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mungkin bisa dibuat const untuk "semua"

req.sekolah = "semua"
}

nilai, err := mnilai.GetNilaiSiswa(req.nim, req.sekolah, req.kelas, mapel_id)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mapel_id dari mana ya?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants