feat: rank community recommendation feed
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user