mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 19:47:47 +08:00
chore: mark as removed instead of delete history
This commit is contained in:
2
db/db.go
2
db/db.go
@@ -499,7 +499,7 @@ func (c *Client) GetHistory(id int) *ent.History {
|
||||
}
|
||||
|
||||
func (c *Client) DeleteHistory(id int) error {
|
||||
_, err := c.ent.History.Delete().Where(history.ID(id)).Exec(context.Background())
|
||||
err := c.ent.History.Update().Where(history.ID(id)).SetStatus(history.StatusRemoved).Exec(context.Background())
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user