Fix delete

This commit is contained in:
Adria Navarro 2023-07-19 23:07:40 +02:00
parent 48e966d5d6
commit 0b17d6026a
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ export function createViewsStore() {
const deleteView = async view => {
if (view.version === 2) {
await API.viewV2.delete(view._id)
await API.viewV2.delete(view.id)
} else {
await API.deleteView(view.name)
}

View File

@ -23,7 +23,7 @@ export const buildViewV2Endpoints = API => ({
* @param tableId the id of the table
* @param viewId the id of the view
*/
delete: async (tableId, viewId) => {
return await API.delete({ url: `/api/v2/views/${tableId}/${viewId}` })
delete: async viewId => {
return await API.delete({ url: `/api/v2/views/${viewId}` })
},
})