refactor: migrate stack repo to kysely (#15440)

* wip

* wip: add tags

* wip

* sql

* pr feedback

* pr feedback

* ergonomic

* pr feedback

* pr feedback
This commit is contained in:
Alex 2025-01-21 09:36:28 -06:00 committed by GitHub
parent 887267b133
commit 318dd32363
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 209 additions and 364 deletions

View file

@ -192,7 +192,7 @@ export class AssetService extends BaseService {
const stackAssetIds = asset.stack.assets.map((a) => a.id);
if (stackAssetIds.length > 2) {
const newPrimaryAssetId = stackAssetIds.find((a) => a !== id)!;
await this.stackRepository.update({
await this.stackRepository.update(asset.stack.id, {
id: asset.stack.id,
primaryAssetId: newPrimaryAssetId,
});