You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace App\Http\Controllers\Web\QRService\Acquisition;
-
- use App\Http\Controllers\Web\WebController;
- use App\Models\HtpmsCustomer\QRService\AcquisitionTicketToken;
- use Illuminate\Http\JsonResponse;
- use Illuminate\Http\Request;
- use Str;
-
- class RefreshAcquisitionTokenController extends WebController
- {
-
- public function name(): string
- {
- return "サービス券取得用トークンリフレッシュ";
- }
-
- public function description(): string
- {
- return "サービス券取得用トークンをリフレッシュする";
- }
-
-
- public function __construct(protected RefreshGetAcquisitionTokenParam $param)
- {
- parent::__construct();
- }
-
- protected function run(Request $request): JsonResponse
- {
- $shopId = $this->sessionUser->shopId();
-
- $token = AcquisitionTicketToken::whereShopId($shopId)->firstOrNew();
-
- $token->shop_id = $shopId;
- $token->token = Str::uuid()->toString();
- $token->save();
-
- return $this->successResponse();
- }
- }
|