Add sdk.automation.find

This commit is contained in:
Adria Navarro 2024-10-23 12:18:53 +02:00
parent 23cf44b242
commit 713500febb
1 changed files with 6 additions and 0 deletions

View File

@ -99,6 +99,12 @@ export async function get(automationId: string) {
return trimUnexpectedObjectFields(result)
}
export async function find(ids: string[]) {
const db = getDb()
const result = await db.getMultiple<PersistedAutomation>(ids)
return result.map(trimUnexpectedObjectFields)
}
export async function create(automation: Automation) {
automation = trimUnexpectedObjectFields(automation)
const db = getDb()