]> git.localhorst.tv Git - alttp.git/blobdiff - app/Http/Controllers/ChannelController.php
update muffins tracker
[alttp.git] / app / Http / Controllers / ChannelController.php
index 883ca65eff2360d93bcd20d9fb2d2bf93640caad..f9cf0d27f50aa3e020fb413aa5428aad2fc8a3e8 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', 'user'])
+                       ->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');