enhance(cosy): permanently delete

This commit is contained in:
0xJacky 2023-12-20 12:27:49 +08:00
parent 6d5f34751d
commit 5a19133254
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
2 changed files with 3 additions and 4 deletions

View file

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

View file

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