From 5a19133254f975dd9a246c7908487ef53c73d511 Mon Sep 17 00:00:00 2001 From: 0xJacky Date: Wed, 20 Dec 2023 12:27:49 +0800 Subject: [PATCH] enhance(cosy): permanently delete --- api/cosy/delete.go | 4 ++-- api/notification/notification.go | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/api/cosy/delete.go b/api/cosy/delete.go index 8870b6e0..78bb5a5e 100644 --- a/api/cosy/delete.go +++ b/api/cosy/delete.go @@ -6,9 +6,9 @@ import ( "net/http" ) -func (c *Ctx[T]) PermanentlyDelete() *Ctx[T] { +func (c *Ctx[T]) PermanentlyDelete() { c.permanentlyDelete = true - return c + c.Destroy() } func (c *Ctx[T]) Destroy() { diff --git a/api/notification/notification.go b/api/notification/notification.go index 73cfb647..952a6f02 100644 --- a/api/notification/notification.go +++ b/api/notification/notification.go @@ -31,8 +31,7 @@ func GetList(c *gin.Context) { func Destroy(c *gin.Context) { cosy.Core[model.Notification](c). - PermanentlyDelete(). - Destroy() + PermanentlyDelete() } func DestroyAll(c *gin.Context) {