Skip to content

Commit 33d52d2

Browse files
committed
Fix
1 parent 10c0156 commit 33d52d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/controllers/entries/delete-entry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const requestSchema = {
1313
query: z.object({
1414
lockToken: z.string().optional(),
1515
scope: z.nativeEnum(EntryScope).optional(),
16-
types: zc.stringArray({min: 0, max: 100}).optional(),
16+
types: zc.stringArray({min: 1, max: 100}).optional(),
1717
}),
1818
};
1919

src/services/entry/actions/delete-entry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export async function deleteEntry(
9090
builder.andWhere({[`${Entry.tableName}.${EntryColumn.Scope}`]: scope});
9191
}
9292

93-
if (types) {
93+
if (types && types.length > 0) {
9494
builder.whereIn([`${Entry.tableName}.${EntryColumn.Type}`], types);
9595
}
9696
})

0 commit comments

Comments
 (0)