Skip to content

Commit 5a19133

Browse files
committed
enhance(cosy): permanently delete
1 parent 6d5f347 commit 5a19133

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

api/cosy/delete.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"net/http"
77
)
88

9-
func (c *Ctx[T]) PermanentlyDelete() *Ctx[T] {
9+
func (c *Ctx[T]) PermanentlyDelete() {
1010
c.permanentlyDelete = true
11-
return c
11+
c.Destroy()
1212
}
1313

1414
func (c *Ctx[T]) Destroy() {

api/notification/notification.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ func GetList(c *gin.Context) {
3131

3232
func Destroy(c *gin.Context) {
3333
cosy.Core[model.Notification](c).
34-
PermanentlyDelete().
35-
Destroy()
34+
PermanentlyDelete()
3635
}
3736

3837
func DestroyAll(c *gin.Context) {

0 commit comments

Comments
 (0)