Enables comment deletion

This commit is contained in:
Oleg Silkin 2019-07-30 00:23:15 -04:00
parent b137c73db9
commit c9996fd658
3 changed files with 2 additions and 4 deletions

View file

@ -1,7 +1,6 @@
# cython: language_level=3 # cython: language_level=3
import logging import logging
import pathlib import pathlib
import re
import signal import signal
import time import time

View file

@ -194,8 +194,8 @@ class DatabaseWriter(object):
def cleanup(self): def cleanup(self):
logging.info('Cleaning up database writer') logging.info('Cleaning up database writer')
DatabaseWriter._writer = None
self.conn.close() self.conn.close()
DatabaseWriter._writer = None
@property @property
def connection(self): def connection(self):

View file

@ -10,7 +10,6 @@ from src.server.misc import clean_input_params
from src.server.database import get_claim_comments from src.server.database import get_claim_comments
from src.server.database import get_comments_by_id, get_comment_ids from src.server.database import get_comments_by_id, get_comment_ids
from src.server.database import get_channel_id_from_comment_id from src.server.database import get_channel_id_from_comment_id
from src.server.database import obtain_connection
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
@ -63,7 +62,7 @@ METHODS = {
'get_comments_by_id': handle_get_comments_by_id, 'get_comments_by_id': handle_get_comments_by_id,
'get_channel_from_comment_id': handle_get_channel_from_comment_id, 'get_channel_from_comment_id': handle_get_channel_from_comment_id,
'create_comment': handle_create_comment, 'create_comment': handle_create_comment,
# 'delete_comment': handle_delete_comment, 'delete_comment': handle_delete_comment,
# 'abandon_comment': handle_delete_comment, # 'abandon_comment': handle_delete_comment,
} }