migrate body API

This commit is contained in:
2022-10-05 12:32:48 +03:00
parent 5811e0e878
commit 9b16d5017a
4 changed files with 25 additions and 3 deletions

View File

@@ -15,6 +15,8 @@ from resolvers.community import (
get_communities,
)
from resolvers.migrate import markdown_body
# from resolvers.collab import invite_author, remove_author
from resolvers.editor import create_shout, delete_shout, update_shout
from resolvers.profile import (
@@ -89,6 +91,8 @@ __all__ = [
"create_shout",
"update_shout",
"delete_shout",
# migrate
"markdown_body",
# collab
"invite_author",
"remove_author",

11
resolvers/migrate.py Normal file
View File

@@ -0,0 +1,11 @@
from base.orm import query
from resoolvers.auth import login_required
from migration.extract import extract_md
@login_required
@query.field("markdownBody")
def markdown_body(_, info, body):
body = extract_md(body)
return body