From 7f7750159bff5d76f0cbce4dfb812c38a0ca05ea Mon Sep 17 00:00:00 2001 From: Tom Gobich Date: Mon, 23 Dec 2024 07:44:55 -0500 Subject: [PATCH] fixed: logout flow & updating settings links --- app/controllers/auth/logout_controller.ts | 4 ++-- inertia/layouts/AppLayout.vue | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/controllers/auth/logout_controller.ts b/app/controllers/auth/logout_controller.ts index f410419..970a905 100644 --- a/app/controllers/auth/logout_controller.ts +++ b/app/controllers/auth/logout_controller.ts @@ -2,11 +2,11 @@ import User from '#models/user' import type { HttpContext } from '@adonisjs/core/http' export default class LogoutController { - async handle({ response, auth, session }: HttpContext) { + async handle({ auth, session, inertia }: HttpContext) { await User.logout(auth) session.flash('success', 'See you next time') - return response.redirect().toRoute('auth.login.show') + return inertia.location('https://adocasts.com/signin?action=cms') } } diff --git a/inertia/layouts/AppLayout.vue b/inertia/layouts/AppLayout.vue index ccdfad6..fb7346e 100644 --- a/inertia/layouts/AppLayout.vue +++ b/inertia/layouts/AppLayout.vue @@ -27,11 +27,20 @@ const props = defineProps<{ {{ user.username }} - + + Account Settings + + Profile Settings - - Account Settings + + Billing Settings + + + Manage Notification + + + Manage Your Data