diff options
author | desvox <ofunknowndescent@gmail.com> | 2018-08-05 22:25:02 -0500 |
---|---|---|
committer | desvox <ofunknowndescent@gmail.com> | 2018-08-05 22:25:02 -0500 |
commit | 1c296cc500e507008b9a7a0ffb06b0dc26202a1a (patch) | |
tree | 6b2bdd636b40df089130cdbccffeff153e9285a5 /server.py | |
parent | cba92412a82f0737cf2517412fabb825ed133ccb (diff) | |
download | bbj-1c296cc500e507008b9a7a0ffb06b0dc26202a1a.tar.gz |
Allow admins to set server pins from client.
Diffstat (limited to 'server.py')
-rw-r--r-- | server.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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.") ) |