Skip to content

Commit

Permalink
Remove another delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikthepixel committed Jan 19, 2024
1 parent 372eba6 commit 902c4e0
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ export default class KnexAdvertisementRepository
})),
);

const [images, propertyValues] = await Promise.all([imagesTask, propertyValuesTask])
const [images, propertyValues] = await Promise.all([
imagesTask,
propertyValuesTask,
]);

return {
...ad,
Expand Down Expand Up @@ -474,11 +477,8 @@ export default class KnexAdvertisementRepository

async delete(uidOrId: UidOrId): Promise<void> {
await this.db
.table(this.table + ' as ads')
.where(
`ads.${getType(uidOrId)}`,
castUidOrId(uidOrId, this.db.fn.uuidToBin),
)
.table(this.table)
.where(`${getType(uidOrId)}`, castUidOrId(uidOrId, this.db.fn.uuidToBin))
.delete();
}
}

0 comments on commit 902c4e0

Please sign in to comment.