neardevhub-bos icon indicating copy to clipboard operation
neardevhub-bos copied to clipboard

Migrate v1 blogs to v2

Open ailisp opened this issue 1 year ago • 9 comments

Now each community has its community account that we can store community owned data in SocialDB. We have it to store announcements. I propose to migrate the blog system to store in community SocialDB because it would be not hacking post with json content to store blogs, require no migration, and can utilize the NearSocial's index api (not QueryAPI) to list blog feed and will not have issues like https://github.com/NEAR-DevHub/neardevhub-bos/issues/653.

Acceptance Criteria

  • [x] Add add_blog/edit_blog method in devhub contract, which check if the caller is community admin, and save blog post in community's SocialDB
  • [x] replace the create and edit blog with add_blog and edit_blog on frontend
  • [x] list blogs with Social.index
  • [x] Migrating existing blog posts to SocialDB

ailisp avatar Feb 07 '24 00:02 ailisp