# Intercept a DELETE default route not working in record list

**URL:** https://community.forestadmin.com/t/intercept-a-delete-default-route-not-working-in-record-list/6384
**Category:** Help me!
**Created:** [June 5, 2023, 2:30pm UTC](https://community.forestadmin.com/t/intercept-a-delete-default-route-not-working-in-record-list/6384 "2023-06-05T14:30:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![guillaumejauffret](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumejauffret/32/61_2.png) [@guillaumejauffret](https://community.forestadmin.com/u/guillaumejauffret)
#### Post date: [June 5, 2023, 2:30pm UTC](https://community.forestadmin.com/t/intercept-a-delete-default-route-not-working-in-record-list/6384/1 "2023-06-05T14:30:48Z")

</div>

Hi,

when I try to intercept a DELETE default route, it works when I go to the record summary and select `Delete photo` in the Actions menu

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/4/444a49d7dd1f601ebb07a092da7abcb8bfdd94fa.png)

Here is my interception:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/a/a04d1ea50bfd9f915f43aa93514850df388b1809.png)

![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/b4ac071145f2f2fe7952cb1bbda08b48108d6cee.png)

However, when I use the `Delete` button from the record list after selecting one record, the call is not intercepted and it directly deletes the record in the DB.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/4/40cc0eaf9c5fdeba95fdaaadab6a8dacdebe5754.png)

Is it a normal behaviour ?

Best regards

Projet: joinly-forest  
Config:

```javascript
{
    "liana": "forest-express-mongoose",
    "liana_version": "8.7.9",
    "stack": {
      "database_type": "multiple",
      "engine": "nodejs",
      "engine_version": "18.12.1",
      "orm_version": "5.8.13"
    }
  }

```

---

<div class="post-metadata">

### Author: ![anon7284711](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anon7284711](https://community.forestadmin.com/u/anon7284711)
#### Post date: [June 5, 2023, 3:26pm UTC](https://community.forestadmin.com/t/intercept-a-delete-default-route-not-working-in-record-list/6384/2 "2023-06-05T15:26:13Z")

</div>

Hello @guillaumejauffret,

The delete call with multiple records is not intercepted by your route definition because it does not match the path:

- For a single record: DELETE `/PE_File/:fileId`
- Multiple records: DELETE `/PE_File`

You can define a second route to override the bulk delete and handle the multiple records deletion with your function.

Hope this helps !

Best regards,

---

<div class="post-metadata">

### Author: ![guillaumejauffret](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumejauffret/32/61_2.png) [@guillaumejauffret](https://community.forestadmin.com/u/guillaumejauffret)
#### Post date: [June 5, 2023, 3:29pm UTC](https://community.forestadmin.com/t/intercept-a-delete-default-route-not-working-in-record-list/6384/4 "2023-06-05T15:29:01Z")

</div>

thanks @anon7284711 , it is clear
