kopia lustrzana https://github.com/pixelfed/pixelfed
				
				
				
			Update PublicApiController
							rodzic
							
								
									0c4d270f02
								
							
						
					
					
						commit
						7311e81382
					
				|  | @ -256,16 +256,16 @@ class PublicApiController extends Controller | |||
|         // }
 | ||||
| 
 | ||||
|         $filtered = Auth::check() ? array_merge($private, UserFilterService::filters(Auth::user()->profile_id)) : []; | ||||
|         if($max == 0) { | ||||
|             $res = PublicTimelineService::count(); | ||||
|             if($res == 0) { | ||||
|                 PublicTimelineService::warmCache(); | ||||
|                 $res = PublicTimelineService::get(0,4); | ||||
|             } else { | ||||
|                 $res = PublicTimelineService::get(0,4); | ||||
|             } | ||||
|             return response()->json($res); | ||||
|         }  | ||||
|         // if($max == 0) {
 | ||||
|         //     $res = PublicTimelineService::count();
 | ||||
|         //     if($res == 0) {
 | ||||
|         //         PublicTimelineService::warmCache();
 | ||||
|         //         $res = PublicTimelineService::get(0,4);
 | ||||
|         //     } else {
 | ||||
|         //         $res = PublicTimelineService::get(0,4);
 | ||||
|         //     }
 | ||||
|         //     return response()->json($res);
 | ||||
|         // } 
 | ||||
| 
 | ||||
|         if($min || $max) { | ||||
|             $dir = $min ? '>' : '<'; | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Daniel Supernault
						Daniel Supernault