Fix types
This commit is contained in:
parent
3cfe556b0f
commit
de3eae2d47
|
@ -41,7 +41,7 @@ export async function create(tableId: string, rowAction: { name: string }) {
|
|||
throw e
|
||||
}
|
||||
|
||||
doc = { _id: rowActionsId, actions: {} }
|
||||
doc = { _id: rowActionsId, tableId, actions: {} }
|
||||
}
|
||||
|
||||
ensureUniqueAndThrow(doc, action.name)
|
||||
|
@ -75,6 +75,10 @@ export async function create(tableId: string, rowAction: { name: string }) {
|
|||
doc.actions[newRowActionId] = {
|
||||
name: action.name,
|
||||
automationId: automation._id!,
|
||||
permissions: {
|
||||
table: { runAllowed: true },
|
||||
views: {},
|
||||
},
|
||||
}
|
||||
await db.put(doc)
|
||||
|
||||
|
@ -115,7 +119,7 @@ export async function update(
|
|||
ensureUniqueAndThrow(actionsDoc, action.name, rowActionId)
|
||||
|
||||
actionsDoc.actions[rowActionId] = {
|
||||
automationId: actionsDoc.actions[rowActionId].automationId,
|
||||
...actionsDoc.actions[rowActionId],
|
||||
...action,
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import { Document } from "../document"
|
|||
|
||||
export interface TableRowActions extends Document {
|
||||
_id: string
|
||||
tableId: string
|
||||
actions: Record<
|
||||
string,
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue