Appearance
@sylis/api / modules/learning/learning.service / LearningService
Class: LearningService
Defined in: apps/api/src/modules/learning/learning.service.ts:12
Constructors
Constructor
new LearningService(
learningRepository
):LearningService
Defined in: apps/api/src/modules/learning/learning.service.ts:13
Parameters
learningRepository
Returns
LearningService
Methods
addBook()
addBook(
dto
,userId
):Promise
<{ }>
Defined in: apps/api/src/modules/learning/learning.service.ts:15
Parameters
dto
userId
string
Returns
Promise
<{ }>
getBookDetail()
getBookDetail(
userId
,bookId
):Promise
<BookDetailResDto
>
Defined in: apps/api/src/modules/learning/learning.service.ts:136
Parameters
userId
string
bookId
string
Returns
Promise
<BookDetailResDto
>
getBookInfo()
getBookInfo(
bookId
):Promise
<null
| { }>
Defined in: apps/api/src/modules/learning/learning.service.ts:34
Parameters
bookId
string
Returns
Promise
<null
| { }>
getCurrentBook()
getCurrentBook(
userId
):Promise
<GetCurrentBookResDto
>
Defined in: apps/api/src/modules/learning/learning.service.ts:42
Parameters
userId
string
Returns
Promise
<GetCurrentBookResDto
>
getLearningStats()
getLearningStats(
userId
):Promise
<LearningStatsResDto
>
Defined in: apps/api/src/modules/learning/learning.service.ts:93
Parameters
userId
string
Returns
Promise
<LearningStatsResDto
>
getTodayProgress()
getTodayProgress(
userId
):Promise
<{completed
:number
;total
:number
; }>
Defined in: apps/api/src/modules/learning/learning.service.ts:123
Parameters
userId
string
Returns
Promise
<{ completed
: number
; total
: number
; }>
getUserBook()
getUserBook(
userId
,bookId
):Promise
<null
| { }>
Defined in: apps/api/src/modules/learning/learning.service.ts:38
Parameters
userId
string
bookId
string
Returns
Promise
<null
| { }>
getUserLearning()
getUserLearning(
userId
):Promise
<null
| { }>
Defined in: apps/api/src/modules/learning/learning.service.ts:30
Parameters
userId
string
Returns
Promise
<null
| { }>