diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php index 90f4044..6a6607e 100644 --- a/app/Controllers/Admin/UserController.php +++ b/app/Controllers/Admin/UserController.php @@ -17,8 +17,13 @@ class UserController extends AdminController } public function getFields(string $action = ""): array { - $fields = ["id", "passwd", 'name', "email", "email", "phone", "role", "status"]; switch ($action) { + case 'insert': + return ["id", "passwd", 'name', "email", "email", "phone", "role", "status"]; + break; + case 'update': + return ["passwd", 'name', "email", "email", "phone", "role", "status"]; + break; case "index": case "excel": return ["id", 'name', "email", "email", "phone", "role", "status", 'created_at']; @@ -27,7 +32,7 @@ class UserController extends AdminController return ["id", 'name', "email", "email", "phone", "role", "status", 'updated_at', 'created_at']; break; default: - return $fields; + return throw new \Exception("{$action} 해당기능은 없습니다."); break; } }