Skip to content

Commit

Permalink
🐛 delete record, edit size
Browse files Browse the repository at this point in the history
  • Loading branch information
XxLittleCxX committed Oct 12, 2021
1 parent 90863ee commit 09175f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
3 changes: 3 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
$user->score -= $diff;
$user->save();
}
if ($record && $record->review_state === ReviewState::MANUAL) {
$record->delete();
}
});
$filter->add('can_update_texture_privacy', function ($init, $texture) {
// private to public
Expand Down
11 changes: 2 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Texture Moderation

https://github.com/bs-community/blessing-skin-server/blob/dev/app/Http/Controllers/SkinlibController.php#L89
## 如何开发

```php
return $query->where('public', true)
->where('state', 1);
```

需求文档:docs/requirement.md

技术方案:docs/proposal.md
配置好 NodeJS 环境, `yarn global add esbuild`, 运行 `build.sh` 构建前端文件, 然后重新加载插件。
2 changes: 1 addition & 1 deletion src/Controllers/ModerationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function start(Texture $texture)
$record = new ModerationRecord;
$record->tid = $texture->tid;
$size = getimagesizefromstring($file);
if ($size[0] <= 50 || $size[1] <= 50) {
if ($size[0] <= 100 || $size[1] <= 100) {
$record->review_state = ReviewState::MISS;
$record->save();
return;
Expand Down

0 comments on commit 09175f0

Please sign in to comment.