Fix delete
This commit is contained in:
parent
48e966d5d6
commit
0b17d6026a
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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}` })
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue