]> git.localhorst.tv Git - alttp.git/blobdiff - app/Http/Controllers/ChannelController.php
chat bot protocol ui
[alttp.git] / app / Http / Controllers / ChannelController.php
index 883ca65eff2360d93bcd20d9fb2d2bf93640caad..15213b412f675481ca86d854a4ecbf1579f0dfc6 100644 (file)
@@ -68,6 +68,16 @@ class ChannelController extends Controller {
                return $this->sendChannel($channel);
        }
 
+       public function chatBotLog(Request $request, Channel $channel) {
+               $this->authorize('editRestream', $channel);
+               $log = $channel->chat_bot_logs()
+                       ->with('origin')
+                       ->orderBy('created_at', 'DESC')
+                       ->limit(150)
+                       ->get();
+               return $log->values()->toJson();
+       }
+
        public function chatSettings(Request $request, Channel $channel) {
                if (!$channel->twitch_chat) {
                        throw new \Exception('channel has no twitch chat set');