Gets rid of redundant create_comment function
This commit is contained in:
parent
7dee7cc853
commit
c55012176e
1 changed files with 6 additions and 11 deletions
|
@ -1,19 +1,18 @@
|
|||
import asyncio
|
||||
import logging
|
||||
import time
|
||||
|
||||
import asyncio
|
||||
from aiohttp import web
|
||||
from aiojobs.aiohttp import atomic
|
||||
|
||||
from src.server.misc import clean_input_params, report_error
|
||||
from src.database.queries import get_claim_comments
|
||||
from src.database.queries import get_comments_by_id, get_comment_ids
|
||||
from src.database.queries import get_channel_id_from_comment_id
|
||||
from src.database.queries import get_claim_comments
|
||||
from src.database.queries import get_claim_hidden_comments
|
||||
from src.server.misc import make_error
|
||||
from src.database.queries import get_comments_by_id, get_comment_ids
|
||||
from src.database.writes import abandon_comment_if_authorized, create_comment
|
||||
from src.database.writes import hide_comments_where_authorized
|
||||
|
||||
from src.server.misc import clean_input_params
|
||||
from src.server.errors import make_error, report_error
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -43,10 +42,6 @@ def handle_get_claim_hidden_comments(app, kwargs):
|
|||
return get_claim_hidden_comments(app['reader'], **kwargs)
|
||||
|
||||
|
||||
async def handle_create_comment(app, params):
|
||||
return await create_comment(app, params)
|
||||
|
||||
|
||||
async def handle_abandon_comment(app, params):
|
||||
return {'abandoned': await abandon_comment_if_authorized(app, **params)}
|
||||
|
||||
|
@ -62,7 +57,7 @@ METHODS = {
|
|||
'get_comment_ids': handle_get_comment_ids,
|
||||
'get_comments_by_id': handle_get_comments_by_id,
|
||||
'get_channel_from_comment_id': handle_get_channel_from_comment_id,
|
||||
'create_comment': handle_create_comment,
|
||||
'create_comment': create_comment,
|
||||
'delete_comment': handle_abandon_comment,
|
||||
'abandon_comment': handle_abandon_comment,
|
||||
'hide_comments': handle_hide_comments
|
||||
|
|
Loading…
Reference in a new issue