<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2025 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace App\Http\Controllers\Admin\System;

use Illuminate\Http\Request;
use App\Http\Controllers\BaseController;
use App\Traits\AdminController;
use App\Services\System\ModulesService;

class Modules extends BaseController {

	use AdminController;
	protected $service = null;

	public function __construct(ModulesService $service) {
		$this->service = $service;
	}

	public function update(Request $request){
		try {
			$this->data['data'] = $this->service->update($request);
		} catch (\Throwable $e) {
			$this->data['code'] = 0;
			$this->data['message'] = $e->getMessage();
		}
		return response()->json($this->data);
	}
}
