aboutsummaryrefslogtreecommitdiffstats
path: root/src/py/notice.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/py/notice.py')
-rw-r--r--src/py/notice.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/py/notice.py b/src/py/notice.py
index de2e2d8..564aa96 100644
--- a/src/py/notice.py
+++ b/src/py/notice.py
@@ -25,6 +25,16 @@ class Notice:
Proxy.instance.register_call(
'core/notice/', 'get_unseen_count', self.get_unseen_count)
+ def unload(self):
+ Proxy.instance.unregister_call(
+ 'core/notice/', 'list_notice')
+ Proxy.instance.unregister_call(
+ 'core/notice/', 'read_notice')
+ Proxy.instance.unregister_call(
+ 'core/notice/', 'del_notice')
+ Proxy.instance.unregister_call(
+ 'core/notice/', 'get_unseen_count')
+
@TOJAuth.check_access(_accessid, TOJAuth.ACCESS_EXECUTE)
def send_notice(self, uid, title, content, noticemod_path, metadata):
cur = self.db.cursor()
@@ -78,6 +88,8 @@ class Notice:
self._del_notice(noticeid)
self.notify_client(notice['uid'])
+ return 'Success'
+
@TOJAuth.check_access(_accessid, TOJAuth.ACCESS_EXECUTE)
def _del_notice(self, noticeid):
cur = self.db.cursor()
@@ -141,6 +153,8 @@ class Notice:
with TOJAuth.change_current_iden(self._idendesc):
self.set_notice_unread(noticeid, False)
+ return 'Success'
+
@TOJAuth.check_access(_accessid, TOJAuth.ACCESS_EXECUTE)
def set_notice_unread(self, noticeid, unread):
cur = self.db.cursor()
@@ -233,6 +247,3 @@ class Notice:
return ret
- def unload():
- pass
-