Skip to content

Commit

Permalink
πŸ”€ :: (#199) λ‹΄λ‹Ή 반 쑰회 API μˆ˜μ • (#119)
Browse files Browse the repository at this point in the history
πŸ”€ :: (#199) λ‹΄λ‹Ή 반 쑰회 API μˆ˜μ • (#119)
  • Loading branch information
alsco39 authored Jul 12, 2023
1 parent 03b5faa commit bedea87
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ class TeacherUseCase(
}

override fun queryMyBuckGradeAndClassNum(): QueryMyBuckGradeAndClassNumResponse {
val userId = userSpi.getCurrentUserId()
val userInfo = userSpi.queryUserInfoByUserId(userId)
val userInfo = userSpi.queryUserInfoByUserId(userSpi.getCurrentUserId())

return QueryMyBuckGradeAndClassNumResponse(userInfo.grade, userInfo.classNum)
val userGrade = if (userInfo.grade == 0) userInfo.grade else 1
val userClassNum = if (userInfo.classNum == 0) userInfo.classNum else 1

return QueryMyBuckGradeAndClassNumResponse(userGrade, userClassNum)
}

private fun User.paddedUserNum(): String =
Expand Down

0 comments on commit bedea87

Please sign in to comment.