浏览代码

update: log record

tokumeikoi 3 年之前
父节点
当前提交
91418caf04
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      app/Services/ServerService.php

+ 1 - 0
app/Services/ServerService.php

@@ -260,6 +260,7 @@ class ServerService
 
     public function log(int $userId, int $serverId, int $u, int $d, float $rate, string $method)
     {
+        if (($u + $d) < 10240) return true;
         $timestamp = strtotime(date('Y-m-d H:0'));
         $serverLog = ServerLog::where('log_at', '>=', $timestamp)
             ->where('log_at', '<', $timestamp + 3600)