delete_comment > abandon_comment
This commit is contained in:
parent
d0488dcf47
commit
3aec342f8b
2 changed files with 3 additions and 4 deletions
|
@ -37,11 +37,11 @@ def insert_channel_or_error(conn: sqlite3.Connection, channel_name: str, channel
|
||||||
raise ValueError('Received invalid values for channel_id or channel_name')
|
raise ValueError('Received invalid values for channel_id or channel_name')
|
||||||
|
|
||||||
|
|
||||||
async def delete_comment(app, comment_id):
|
async def abandon_comment(app, comment_id):
|
||||||
return await coroutine(delete_comment_by_id)(app['writer'], comment_id)
|
return await coroutine(delete_comment_by_id)(app['writer'], comment_id)
|
||||||
|
|
||||||
|
|
||||||
async def delete_comment_if_authorized(app, comment_id, **kwargs):
|
async def abandon_comment_if_authorized(app, comment_id, **kwargs):
|
||||||
authorized = await is_authentic_delete_signal(app, comment_id, **kwargs)
|
authorized = await is_authentic_delete_signal(app, comment_id, **kwargs)
|
||||||
if not authorized:
|
if not authorized:
|
||||||
return {'deleted': False}
|
return {'deleted': False}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# cython: language_level=3
|
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@ from src.database.queries import get_claim_hidden_comments
|
||||||
from src.server.misc import is_valid_base_comment
|
from src.server.misc import is_valid_base_comment
|
||||||
from src.server.misc import is_valid_credential_input
|
from src.server.misc import is_valid_credential_input
|
||||||
from src.server.misc import make_error
|
from src.server.misc import make_error
|
||||||
from src.database.writes import delete_comment_if_authorized
|
from src.database.writes import abandon_comment_if_authorized
|
||||||
from src.database.writes import write_comment
|
from src.database.writes import write_comment
|
||||||
from src.database.writes import hide_comments_where_authorized
|
from src.database.writes import hide_comments_where_authorized
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue