@ -80,7 +80,8 @@ class AuthApiController extends BaseAuthApiController
// response
return response()->json([
'message' => 'Successfully logged out'
'status' => true,
'message' => 'Đăng xuất thành công.'
]);
}
function transformRegisterData($data)
@ -37,7 +37,7 @@ Route::group( ['middleware' => ['client']], function() {
Route::post('/login', [AuthApiController::class, 'login']);
Route::post('/register', [AuthApiController::class, 'register']);
Route::group( ['middleware' => ['client']], function() {
Route::group( ['middleware' => ['client', 'auth:api']], function() {
Route::post('/logout', [AuthApiController::class, 'logout']);
});