-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add post-comments actions, model, update components
- Loading branch information
Showing
12 changed files
with
168 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/app/action/post-comment/likePostComment/likePostComment.action.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { request } from '@/app/lib/fetch/request.ts'; | ||
import { isDomainComment } from 'product-types/dist/comment/DomainComment'; | ||
|
||
|
||
export const likePostCommentAction = function (commentId: string) { | ||
return request( | ||
`v1/post-comment/like/${ commentId }`, | ||
{ | ||
method: 'POST', | ||
}, | ||
isDomainComment, | ||
); | ||
}; |
14 changes: 14 additions & 0 deletions
14
src/app/action/post-comment/sendPostComment/sendPostComment.action.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { request } from '@/app/lib/fetch/request.ts'; | ||
import { isDomainComment } from 'product-types/dist/comment/DomainComment'; | ||
|
||
|
||
export const sendPostCommentAction = function (postId: string, comment: string) { | ||
return request( | ||
`v1/post-comment/${ postId }`, | ||
{ | ||
method: 'POST', | ||
body : JSON.stringify({ comment }), | ||
}, | ||
isDomainComment, | ||
); | ||
}; |
13 changes: 13 additions & 0 deletions
13
src/app/action/post-comment/unlikePostComment/unlikePostComment.action.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { request } from '@/app/lib/fetch/request.ts'; | ||
import { isDomainComment } from 'product-types/dist/comment/DomainComment'; | ||
|
||
|
||
export const unlikePostCommentAction = function (commentId: string) { | ||
return request( | ||
`v1/post-comment/unlike/${ commentId }`, | ||
{ | ||
method: 'POST', | ||
}, | ||
isDomainComment, | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.