fix: webservice dispatch syntax check
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 9 Jun 2021 07:33:43 +0000 (09:33 +0200)
committerMatthias Hecker <36882671+mattzque@users.noreply.github.com>
Wed, 9 Jun 2021 11:49:34 +0000 (13:49 +0200)
commit09849eb8adb566b2f17a7ee533cc4a10ac379fe7
tree101831c8347866d594867ee1fbb02d17d00283be
parent28502d92c420aefa3832e57561044efa06b9ab8b
fix: webservice dispatch syntax check

Early bailout if the command field is not specified in the POST request.

(Not doing this actually leads to an exception in the subsequent debug
because command is an Array and it can't be added to a String,
but ayway the early catch is cleaner error handling.)

Also add a TODO about a potential improvement for permission error handling.
lib/rbot/core/webservice.rb