use sdk formats manager for retrieving formats list

This commit is contained in:
Serik Ibragimov
2024-12-16 16:18:07 +05:00
parent 82775f8d1b
commit c6606c631d

View File

@ -18,14 +18,14 @@
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Repositories\FormatRepository;
use Onlyoffice\DocsIntegrationSdk\Manager\Formats\FormatsManager;
class FormatController extends Controller
{
public function index(FormatRepository $formats)
public function index(FormatsManager $formats)
{
return response()->json([
'formats' => $formats->all(),
'formats' => $formats->getFormatsList(),
]);
}
}