@@ -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() {
@@ -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) {