diff --git a/backend/services/falukantService.js b/backend/services/falukantService.js index 8a2088a..27d8f60 100644 --- a/backend/services/falukantService.js +++ b/backend/services/falukantService.js @@ -3666,7 +3666,7 @@ class FalukantService extends BaseService { ]); timings.step5_load_gifts_and_title = Date.now() - step5Start; - // 6) Kosten berechnen (getGiftCost ist synchron, kein await nötig) + // 6) Kosten berechnen (getGiftCost ist synchron) const step6Start = Date.now(); const result = gifts.map(gift => ({ id: gift.id, @@ -3786,7 +3786,7 @@ class FalukantService extends BaseService { if (!gift) { throw new Error('notFound'); } - const cost = await this.getGiftCost( + const cost = this.getGiftCost( gift.value, user.character.nobleTitle.id, lowestTitle.id @@ -3842,7 +3842,7 @@ class FalukantService extends BaseService { } } - async getGiftCost(value, titleOfNobility, lowestTitleOfNobility) { + getGiftCost(value, titleOfNobility, lowestTitleOfNobility) { const titleLevel = titleOfNobility - lowestTitleOfNobility + 1; return Math.round(value * Math.pow(1 + titleLevel * 0.3, 1.3) * 100) / 100; }