feat: Phase 5 API 개발 완료 (사용자 초대, 알림설정, 계정관리, 거래명세서)
5.1 사용자 초대 기능: - UserInvitation 마이그레이션, 모델, 서비스, 컨트롤러, Swagger - 초대 발송/수락/취소/재발송 API 5.2 알림설정 확장: - NotificationSetting 마이그레이션, 모델, 서비스, 컨트롤러, Swagger - 채널별/유형별 알림 설정 관리 5.3 계정정보 수정 API: - 회원탈퇴, 사용중지, 약관동의 관리 - AccountService, AccountController, Swagger 5.4 매출 거래명세서 API: - 거래명세서 조회/발행/이메일발송 - SaleService 확장, Swagger 문서화
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Helpers\ApiResponse;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\NotificationSetting\BulkUpdateSettingRequest;
|
||||
use App\Http\Requests\NotificationSetting\UpdateSettingRequest;
|
||||
use App\Services\NotificationSettingService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
class NotificationSettingController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly NotificationSettingService $service
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 알림 설정 조회
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
return ApiResponse::handle(
|
||||
fn () => $this->service->getSettings(),
|
||||
__('message.fetched')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 설정 업데이트 (단일)
|
||||
*/
|
||||
public function update(UpdateSettingRequest $request): JsonResponse
|
||||
{
|
||||
return ApiResponse::handle(
|
||||
fn () => $this->service->updateSetting($request->validated()),
|
||||
__('message.updated')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 설정 일괄 업데이트
|
||||
*/
|
||||
public function bulkUpdate(BulkUpdateSettingRequest $request): JsonResponse
|
||||
{
|
||||
return ApiResponse::handle(
|
||||
fn () => $this->service->bulkUpdateSettings($request->validated()['settings']),
|
||||
__('message.bulk_upsert')
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user