Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delete comment API #115

Merged
merged 8 commits into from
Dec 4, 2024
Merged

Add delete comment API #115

merged 8 commits into from
Dec 4, 2024

Conversation

e32wong
Copy link
Contributor

@e32wong e32wong commented Dec 3, 2024

Changes:

  • Added a new delete comment API
  • Revised the delete post API
    • Simplified the post ownership check
    • Delete post API will now delete all comments that belongs to the post
  • Fixed a bug in the user profile tab where it is loading the wrong data

@e32wong e32wong marked this pull request as ready for review December 3, 2024 17:39
});

if (updatedCommentIdResponse.length != 1) {
server.log.error("Invalid comment table update response length: " + updatedCommentIdResponse.length.toString());
Copy link
Member

Choose a reason for hiding this comment

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

i think we should throw an error here instead of logging, probably after the tx.rollback(), though throwing would rollback anyway I think (to be verified)


if (updatedPostIdResponse.length != 1) {
tx.rollback();
Copy link
Member

Choose a reason for hiding this comment

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

should we throw here? not sure

Copy link
Member

@nicobao nicobao left a comment

Choose a reason for hiding this comment

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

See comments

@nicobao nicobao merged commit c55ee85 into zkorum:main Dec 4, 2024
1 check passed
@nicobao
Copy link
Member

nicobao commented Dec 18, 2024

Relates to #104

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