<?php

namespace App\Domains\Admin\Controllers;

use App\Scopes\CommonController;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class TenantGdprUpdateController extends CommonController
{
    public function __invoke(Request $request): JsonResponse
    {
        $this->tenant->update([
            'gdpr_text' => $request->input('gdpr_text'),
        ]);

        return response()->json([
            'status' => 'success',
            'message' => 'Datenschutzerklärung wurde gespeichert.',
        ]);
    }
}
