Enables comment deletion
This commit is contained in:
parent
b137c73db9
commit
c9996fd658
3 changed files with 2 additions and 4 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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):
|
||||||
|
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue