aboutsummaryrefslogtreecommitdiffstats
path: root/server.py
diff options
context:
space:
mode:
authordesvox <ofunknowndescent@gmail.com>2018-08-05 22:25:02 -0500
committerdesvox <ofunknowndescent@gmail.com>2018-08-05 22:25:02 -0500
commit1c296cc500e507008b9a7a0ffb06b0dc26202a1a (patch)
tree6b2bdd636b40df089130cdbccffeff153e9285a5 /server.py
parentcba92412a82f0737cf2517412fabb825ed133ccb (diff)
downloadbbj-1c296cc500e507008b9a7a0ffb06b0dc26202a1a.tar.gz
Allow admins to set server pins from client.
Diffstat (limited to 'server.py')
-rw-r--r--server.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/server.py b/server.py
index f650ecc..a923e18 100644
--- a/server.py
+++ b/server.py
@@ -600,7 +600,7 @@ class API(object):
)
@api_method
- def set_thread_pin(self, args, database, user, **kwargs):
+ def thread_set_pin(self, args, database, user, **kwargs):
"""
Requires the arguments `thread_id` and `value`. `value`
must be a boolean of what the pinned status should be.
@@ -612,9 +612,9 @@ class API(object):
validate(args, ["thread_id", "value"])
if not user["is_admin"]:
raise BBJUserError("Only admins can set thread pins")
- return db.set_thread_pin(database, args["thread_id"], args["value"])
- set_thread_pin.doctype = "Threads & Messages"
- set_thread_pin.arglist = (
+ return db.thread_set_pin(database, args["thread_id"], args["value"])
+ thread_set_pin.doctype = "Threads & Messages"
+ thread_set_pin.arglist = (
("thread_id", "string: the id of the thread to modify."),
("value", "boolean: `true` to pin thread, `false` otherwise.")
)
Un proyecto texto-plano.xyz