diff options
author | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2024-02-10 18:37:40 -0700 |
---|---|---|
committer | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2024-02-10 18:37:40 -0700 |
commit | 2ad43db1ed01fe0b5b116ddda1a5177c9f62c130 (patch) | |
tree | 8a6c6b551e7216d40c86e0954d828c783848a37b /app/Controllers/Http/Dashboard/DeleteController.ts | |
parent | refactor: project maintenance (diff) | |
download | ferdium-server-2ad43db1ed01fe0b5b116ddda1a5177c9f62c130.tar.gz ferdium-server-2ad43db1ed01fe0b5b116ddda1a5177c9f62c130.tar.zst ferdium-server-2ad43db1ed01fe0b5b116ddda1a5177c9f62c130.zip |
updates
Diffstat (limited to 'app/Controllers/Http/Dashboard/DeleteController.ts')
-rw-r--r-- | app/Controllers/Http/Dashboard/DeleteController.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Controllers/Http/Dashboard/DeleteController.ts b/app/Controllers/Http/Dashboard/DeleteController.ts index bd824b0..76e41ca 100644 --- a/app/Controllers/Http/Dashboard/DeleteController.ts +++ b/app/Controllers/Http/Dashboard/DeleteController.ts | |||
@@ -1,20 +1,20 @@ | |||
1 | import type { HttpContext } from '@adonisjs/core/http' | 1 | import type { HttpContext } from '@adonisjs/core/http'; |
2 | 2 | ||
3 | export default class DeleteController { | 3 | export default class DeleteController { |
4 | /** | 4 | /** |
5 | * Display the delete page | 5 | * Display the delete page |
6 | */ | 6 | */ |
7 | public async show({ view }: HttpContext) { | 7 | public async show({ view }: HttpContext) { |
8 | return view.render('dashboard/delete') | 8 | return view.render('dashboard/delete'); |
9 | } | 9 | } |
10 | 10 | ||
11 | /** | 11 | /** |
12 | * Delete user and session | 12 | * Delete user and session |
13 | */ | 13 | */ |
14 | public async delete({ auth, response }: HttpContext) { | 14 | public async delete({ auth, response }: HttpContext) { |
15 | auth.user?.delete() | 15 | auth.user?.delete(); |
16 | auth.use('web').logout() | 16 | auth.use('web').logout(); |
17 | 17 | ||
18 | return response.redirect('/user/login') | 18 | return response.redirect('/user/login'); |
19 | } | 19 | } |
20 | } | 20 | } |