aboutsummaryrefslogtreecommitdiffstats
path: root/app/Controllers/Http/Dashboard/DeleteController.ts
diff options
context:
space:
mode:
authorLibravatar MCMXC <16797721+mcmxcdev@users.noreply.github.com>2024-02-10 18:19:14 -0700
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2024-02-13 06:59:44 +0530
commit7584d2d7a7110aef0331ebfa178b2295842c59fa (patch)
tree900cd71237e6231b57936fcce77ff229cd459041 /app/Controllers/Http/Dashboard/DeleteController.ts
parentupgrade recipes submodule (diff)
downloadferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.tar.gz
ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.tar.zst
ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.zip
refactor: project maintenance
- work in progress
Diffstat (limited to 'app/Controllers/Http/Dashboard/DeleteController.ts')
-rw-r--r--app/Controllers/Http/Dashboard/DeleteController.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/Controllers/Http/Dashboard/DeleteController.ts b/app/Controllers/Http/Dashboard/DeleteController.ts
index ef8188c..bd824b0 100644
--- a/app/Controllers/Http/Dashboard/DeleteController.ts
+++ b/app/Controllers/Http/Dashboard/DeleteController.ts
@@ -1,20 +1,20 @@
1import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'; 1import type { HttpContext } from '@adonisjs/core/http'
2 2
3export default class DeleteController { 3export default class DeleteController {
4 /** 4 /**
5 * Display the delete page 5 * Display the delete page
6 */ 6 */
7 public async show({ view }: HttpContextContract) { 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 }: HttpContextContract) { 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}