<?php

namespace App\Http\Controllers\QQprogram;

use App\Http\Controllers\Controller;
use App\Services\Vendor\QQprogram\AuthService;

class AuthController extends Controller
{
    /**
     * @param  string  $jscode
     * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response
     * @throws \App\Exceptions\AlertException
     */
    public function code2Session(string $jscode)
    {
        $as = new AuthService();
        $data = $as->code2Session($jscode);
        return response([
            'code' => 200,
            'message' => 'success',
            'data' => $data
        ]);
    }
}
