cfmgrv4 init...10

This commit is contained in:
최준흠 2025-03-14 16:43:48 +09:00
parent 5df4cf72fa
commit 8f6632dd4d
2 changed files with 16 additions and 14 deletions

View File

@ -10,6 +10,7 @@ use App\Helpers\Cloudflare\RecordHelper;
use App\Models\Cloudflare\ZoneModel; use App\Models\Cloudflare\ZoneModel;
use App\Services\Cloudflare\RecordService; use App\Services\Cloudflare\RecordService;
use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RedirectResponse;
use App\Services\MyLogService;
class RecordController extends CloudflareController class RecordController extends CloudflareController
{ {
@ -57,15 +58,20 @@ class RecordController extends CloudflareController
} }
//생성 //생성
// protected function create_process_result($message): RedirectResponse|string
// {
// $this->init(__FUNCTION__);
// helper(['form']);
// $this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
// return view(
// strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"),
// data: ['viewDatas' => $this->getViewDatas()]
// );
// }
protected function create_process_result($message): RedirectResponse|string protected function create_process_result($message): RedirectResponse|string
{ {
$this->init(__FUNCTION__); MyLogService::save($this->getService(), __FUNCTION__, $this->myauth, $message, DEFAULTS['STATUS']);
helper(['form']); return redirect()->to($this->myauth->popPreviousUrl())->with('error', $message);
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view(
strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"),
data: ['viewDatas' => $this->getViewDatas()]
);
} }
protected function create_init(string $action, $fields = []): void protected function create_init(string $action, $fields = []): void
{ {

View File

@ -11,6 +11,7 @@ use CodeIgniter\HTTP\RedirectResponse;
use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use App\Services\MyLogService;
class ZoneController extends CloudflareController class ZoneController extends CloudflareController
{ {
@ -64,13 +65,8 @@ class ZoneController extends CloudflareController
//생성 //생성
protected function create_process_result($message): RedirectResponse|string protected function create_process_result($message): RedirectResponse|string
{ {
$this->init(__FUNCTION__); MyLogService::save($this->getService(), __FUNCTION__, $this->myauth, $message, DEFAULTS['STATUS']);
helper(['form']); return redirect()->to($this->myauth->popPreviousUrl())->with('error', $message);
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view(
strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"),
data: ['viewDatas' => $this->getViewDatas()]
);
} }
protected function create_init(string $action, $fields = []): void protected function create_init(string $action, $fields = []): void
{ {