feat: rank community recommendation feed

This commit is contained in:
hajimi
2026-08-02 18:39:36 +08:00
parent 3fc4703986
commit 51cd9898a7
9 changed files with 122 additions and 3 deletions
@@ -92,6 +92,20 @@ class CommunityPostLogic extends BaseLogic
}
}
public static function setSort(array $params): bool
{
try {
CommunityPost::update([
'id' => $params['id'],
'sort' => (int) $params['sort'],
]);
return true;
} catch (\Exception $e) {
self::setError($e->getMessage());
return false;
}
}
public static function setTopic(array $params): bool
{
try {