backend
Preparing search index...
social/social.controller
SocialController
Class SocialController
Index
Constructors
constructor
Methods
create
create
Comment
delete
Comment
find
Comments
get
Comment
History
have
Read
The
Book
like
Author
liking
Book
rate
Book
unlike
unlike
Author
unliking
Book
update
Comment
update
Rate
Book
Constructors
constructor
new
SocialController
(
socialService
:
SocialService
)
:
SocialController
Parameters
socialService
:
SocialService
Returns
SocialController
Methods
create
create
(
commentId
:
string
,
session
:
any
,
)
:
Promise
<
{
commentId
:
string
;
userId
:
string
}
>
Parameters
commentId
:
string
session
:
any
Returns
Promise
<
{
commentId
:
string
;
userId
:
string
}
>
create
Comment
createComment
(
createCommentDto
:
CreateCommentDto
,
session
:
any
,
bookId
:
string
,
)
:
Promise
<
{
user
:
{
biggerProfilePic
:
string
|
null
;
nickname
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
}
;
}
&
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
,
>
Parameters
createCommentDto
:
CreateCommentDto
session
:
any
bookId
:
string
Returns
Promise
<
{
user
:
{
biggerProfilePic
:
string
|
null
;
nickname
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
}
;
}
&
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
,
>
delete
Comment
deleteComment
(
commentId
:
string
,
session
:
any
,
)
:
Promise
<
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
,
>
Parameters
commentId
:
string
session
:
any
Returns
Promise
<
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
,
>
find
Comments
findComments
(
bookId
:
string
,
)
:
Promise
<
(
{
user
:
{
email
:
string
;
nickname
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
}
;
}
&
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
)
[]
,
>
Parameters
bookId
:
string
Returns
Promise
<
(
{
user
:
{
email
:
string
;
nickname
:
string
|
null
;
smallerProfilePic
:
string
|
null
;
}
;
}
&
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
)
[]
,
>
get
Comment
History
getCommentHistory
(
session
:
any
,
)
:
Promise
<
(
{
_count
:
{
votes
:
number
}
;
book
:
{
approveStatus
:
boolean
;
authorId
:
string
|
null
;
biggerCoverPic
:
string
;
biggerCoverPicKey
:
string
|
null
;
createdAt
:
Date
;
description
:
string
;
googleBookId
:
string
|
null
;
id
:
string
;
latestPublicationYear
:
number
|
null
;
openLibraryId
:
string
|
null
;
originalPublicationYear
:
number
|
null
;
originalPublisher
:
string
|
null
;
pageNumber
:
number
|
null
;
smallerCoverPic
:
string
;
smallerCoverPicKey
:
string
|
null
;
title
:
string
;
updatedAt
:
Date
;
}
;
}
&
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
)
[]
,
>
Parameters
session
:
any
Returns
Promise
<
(
{
_count
:
{
votes
:
number
}
;
book
:
{
approveStatus
:
boolean
;
authorId
:
string
|
null
;
biggerCoverPic
:
string
;
biggerCoverPicKey
:
string
|
null
;
createdAt
:
Date
;
description
:
string
;
googleBookId
:
string
|
null
;
id
:
string
;
latestPublicationYear
:
number
|
null
;
openLibraryId
:
string
|
null
;
originalPublicationYear
:
number
|
null
;
originalPublisher
:
string
|
null
;
pageNumber
:
number
|
null
;
smallerCoverPic
:
string
;
smallerCoverPicKey
:
string
|
null
;
title
:
string
;
updatedAt
:
Date
;
}
;
}
&
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
)
[]
,
>
have
Read
The
Book
haveReadTheBook
(
bookId
:
string
,
session
:
any
,
)
:
Promise
<
{
addedAt
:
Date
;
bookId
:
string
;
id
:
string
;
userId
:
string
}
>
Parameters
bookId
:
string
session
:
any
Returns
Promise
<
{
addedAt
:
Date
;
bookId
:
string
;
id
:
string
;
userId
:
string
}
>
like
Author
likeAuthor
(
authorId
:
string
,
session
:
any
,
)
:
Promise
<
{
authorId
:
string
;
userId
:
string
}
>
Parameters
authorId
:
string
session
:
any
Returns
Promise
<
{
authorId
:
string
;
userId
:
string
}
>
liking
Book
likingBook
(
bookId
:
string
,
session
:
any
,
)
:
Promise
<
{
bookId
:
string
;
userId
:
string
}
>
Parameters
bookId
:
string
session
:
any
Returns
Promise
<
{
bookId
:
string
;
userId
:
string
}
>
rate
Book
rateBook
(
bookId
:
string
,
session
:
any
,
createRatingDto
:
CreateRatingDto
,
)
:
Promise
<
{
bookId
:
string
;
createdAt
:
Date
;
score
:
number
;
userId
:
string
}
,
>
Parameters
bookId
:
string
session
:
any
createRatingDto
:
CreateRatingDto
Returns
Promise
<
{
bookId
:
string
;
createdAt
:
Date
;
score
:
number
;
userId
:
string
}
>
unlike
unlike
(
commentId
:
string
,
session
:
any
,
)
:
Promise
<
{
commentId
:
string
;
userId
:
string
}
>
Parameters
commentId
:
string
session
:
any
Returns
Promise
<
{
commentId
:
string
;
userId
:
string
}
>
unlike
Author
unlikeAuthor
(
authorId
:
string
,
session
:
any
,
)
:
Promise
<
{
authorId
:
string
;
userId
:
string
}
>
Parameters
authorId
:
string
session
:
any
Returns
Promise
<
{
authorId
:
string
;
userId
:
string
}
>
unliking
Book
unlikingBook
(
bookId
:
string
,
session
:
any
,
)
:
Promise
<
{
bookId
:
string
;
userId
:
string
}
>
Parameters
bookId
:
string
session
:
any
Returns
Promise
<
{
bookId
:
string
;
userId
:
string
}
>
update
Comment
updateComment
(
commentId
:
string
,
updateCommentDto
:
UpdateCommentDto
,
session
:
any
,
)
:
Promise
<
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
,
>
Parameters
commentId
:
string
updateCommentDto
:
UpdateCommentDto
session
:
any
Returns
Promise
<
{
bookId
:
string
;
createdAt
:
Date
;
id
:
string
;
text
:
string
;
userId
:
string
;
}
,
>
update
Rate
Book
updateRateBook
(
bookId
:
string
,
session
:
any
,
updateRatingDto
:
UpdateRatingDto
,
)
:
Promise
<
{
bookId
:
string
;
createdAt
:
Date
;
score
:
number
;
userId
:
string
}
,
>
Parameters
bookId
:
string
session
:
any
updateRatingDto
:
UpdateRatingDto
Returns
Promise
<
{
bookId
:
string
;
createdAt
:
Date
;
score
:
number
;
userId
:
string
}
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
create
create
Comment
delete
Comment
find
Comments
get
Comment
History
have
Read
The
Book
like
Author
liking
Book
rate
Book
unlike
unlike
Author
unliking
Book
update
Comment
update
Rate
Book
backend
Loading...