weizong song 5 years ago
parent 795a185ecd
commit b30ffaacc2

@ -165,12 +165,12 @@ class AuthController extends Controller
/**
* @OA\Post(
* path="/manager/logout",
* summary="退出登录同时把openid清空",
* summary="V2 退出登录",
* @OA\Parameter(name="token", in="query", @OA\Schema(type="string"), required=true, description="token"),
* description="",
* @OA\Response(
* response="200",
* description="退出登录同时把openid清空"
* description="退出登录"
* )
* )
*/
@ -178,14 +178,10 @@ class AuthController extends Controller
{
DB::beginTransaction();
try {
$user = $this->guard()->user();
$user->update([
"openid" => null
]);
$this->guard()->logout();
DB::commit();
return response()->json([
'errormsg' => "Successfully logged out"
'errormsg' => "退出登录成功!"
]);
} catch (\Exception $exception) {
DB::rollBack();

Loading…
Cancel
Save