Skip to content

Commit

Permalink
use Purge instated of Delete
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Sep 3, 2024
1 parent 3f752e9 commit 87d5116
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/services/nats/bk_room.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (s *NatsService) DeleteBreakoutRoom(parentRoomId, bkRoomId string) error {
return err
}

_ = kv.Delete(s.ctx, bkRoomId)
_ = kv.Purge(s.ctx, bkRoomId)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/services/nats/etherpad.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (s *NatsService) RemoveRoomFromEtherpad(nodeId, roomId string) error {
case err != nil:
return err
}
err = kv.Delete(s.ctx, roomId)
err = kv.Purge(s.ctx, roomId)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/services/nats/user_modify.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (s *NatsService) UpdateUserMetadata(roomId, userId string, metadata interfa

func (s *NatsService) DeleteUser(roomId, userId string) {
if kv, err := s.js.KeyValue(s.ctx, fmt.Sprintf(RoomUsersBucket, roomId)); err == nil {
_ = kv.Delete(s.ctx, userId)
_ = kv.Purge(s.ctx, userId)
}

_ = s.js.DeleteKeyValue(s.ctx, fmt.Sprintf(UserInfoBucket, roomId, userId))
Expand Down
2 changes: 1 addition & 1 deletion pkg/services/nats/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ func (s *NatsService) DeleteWebhookData(roomId string) error {
return err
}

return kv.Delete(s.ctx, roomId)
return kv.Purge(s.ctx, roomId)
}

0 comments on commit 87d5116

Please sign in to comment.