style: Pint 포맷팅 적용
This commit is contained in:
@@ -94,7 +94,7 @@ public function show(int $id): JsonResponse
|
||||
{
|
||||
$config = BarobillConfig::find($id);
|
||||
|
||||
if (!$config) {
|
||||
if (! $config) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => '설정을 찾을 수 없습니다.',
|
||||
@@ -114,7 +114,7 @@ public function update(Request $request, int $id): JsonResponse
|
||||
{
|
||||
$config = BarobillConfig::find($id);
|
||||
|
||||
if (!$config) {
|
||||
if (! $config) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => '설정을 찾을 수 없습니다.',
|
||||
@@ -167,7 +167,7 @@ public function destroy(int $id): JsonResponse
|
||||
{
|
||||
$config = BarobillConfig::find($id);
|
||||
|
||||
if (!$config) {
|
||||
if (! $config) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => '설정을 찾을 수 없습니다.',
|
||||
@@ -196,7 +196,7 @@ public function toggleActive(int $id): JsonResponse
|
||||
{
|
||||
$config = BarobillConfig::find($id);
|
||||
|
||||
if (!$config) {
|
||||
if (! $config) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => '설정을 찾을 수 없습니다.',
|
||||
@@ -205,14 +205,14 @@ public function toggleActive(int $id): JsonResponse
|
||||
|
||||
DB::beginTransaction();
|
||||
try {
|
||||
if (!$config->is_active) {
|
||||
if (! $config->is_active) {
|
||||
// 활성화하려면 같은 환경의 다른 설정들 비활성화
|
||||
BarobillConfig::where('environment', $config->environment)
|
||||
->where('id', '!=', $id)
|
||||
->update(['is_active' => false]);
|
||||
}
|
||||
|
||||
$config->update(['is_active' => !$config->is_active]);
|
||||
$config->update(['is_active' => ! $config->is_active]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
@@ -231,5 +231,4 @@ public function toggleActive(int $id): JsonResponse
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user