Skip to content

Commit

Permalink
Merge pull request #187 from huankong233/dev
Browse files Browse the repository at this point in the history
[*] 禁止删除 `id` 为 `0` 的解析账户
  • Loading branch information
huankong233 authored Aug 11, 2024
2 parents f7916b2 + 1ba947e commit e925484
Show file tree
Hide file tree
Showing 77 changed files with 46 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MAIL_FROM_NAME=Example
MAIL_TO_ADDRESS=hello@example.com
MAIL_TO_NAME=Example

_94LIST_VERSION=1.3.30
_94LIST_VERSION=1.3.31
_94LIST_SLEEP=3
_94LIST_MAX_ONCE=20
_94LIST_PASSWORD=""
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## 2024

### 08-11 v1.3.31

- [*] 禁止删除 `id``0` 的解析账户
- [*] 更新前端

### 08-11 v1.3.30

- [*] 为新模式做铺垫
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/AccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ public function removeAccounts(Request $request)

if ($validator->fails()) return ResponseController::paramsError();

if (in_array(0, $request["account_ids"])) return ResponseController::accountCanNotBeDeleted();

Account::query()->whereIn("id", $request["account_ids"])->delete();

return ResponseController::success();
Expand Down
5 changes: 5 additions & 0 deletions app/Http/Controllers/ResponseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,9 @@ public static function accountTypeWrong($id)
{
return self::response(10066, 500, "账号ID:{$id}的类型错误");
}

public static function accountCanNotBeDeleted()
{
return self::response(10067, 500, "自带账户禁止删除");
}
}
2 changes: 1 addition & 1 deletion config/94list.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"fake_wx_user_agent" => "Mozilla/5.0 (Linux; Android 7.1.1; MI 6 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/043807 Mobile Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN miniProgram",
"fake_cookie" => "BAIDUID=A4FDFAE43DDBF7E6956B02F6EF715373:FG=1; BAIDUID_BFESS=A4FDFAE43DDBF7E6956B02F6EF715373:FG=1; newlogin=1",

"version" => "1.3.30",
"version" => "1.3.31",
"sleep" => (int)env("_94LIST_SLEEP", 3),
"max_once" => (int)env("_94LIST_MAX_ONCE", 20),
"password" => env("_94LIST_PASSWORD", ""),
Expand Down
1 change: 0 additions & 1 deletion public/assets/css/AccountManagement-DdYvS9LZ.css

This file was deleted.

1 change: 1 addition & 0 deletions public/assets/css/AccountManagement-OOe8fkcU.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.table[data-v-1d5a969d],.el-pagination[data-v-1d5a969d]{margin-top:15px}
Binary file removed public/assets/js/AccountManagement-BM4Hx4ju.js.gz
Binary file not shown.

Large diffs are not rendered by default.

Binary file added public/assets/js/AccountManagement-BrmrxlS0.js.gz
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/assets/js/AdminView-BgyQ8fPM.js.gz
Binary file not shown.
Binary file removed public/assets/js/AdminView-DBFG2Awb.js.gz
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed public/assets/js/Aria2Dialog-CnQ2_vfX.js.gz
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/assets/js/Aria2Dialog-IeXa1W7K.js.gz
Binary file not shown.
Binary file removed public/assets/js/ChangeMailConfig-BJ6S8Qd-.js.gz
Binary file not shown.
Loading

0 comments on commit e925484

Please sign in to comment.