From 2a8250c9f7c990837104842a6e5097708f026b7a Mon Sep 17 00:00:00 2001 From: Jonas Lochmann Date: Mon, 23 Nov 2020 01:00:00 +0100 Subject: [PATCH] Require the premium version for confirming the completion of tasks --- .../dispatch-parent-action/reviewchildtaskaction.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/function/sync/apply-actions/dispatch-parent-action/reviewchildtaskaction.ts b/src/function/sync/apply-actions/dispatch-parent-action/reviewchildtaskaction.ts index 448e369..c338bf2 100644 --- a/src/function/sync/apply-actions/dispatch-parent-action/reviewchildtaskaction.ts +++ b/src/function/sync/apply-actions/dispatch-parent-action/reviewchildtaskaction.ts @@ -19,11 +19,16 @@ import { ReviewChildTaskAction } from '../../../../action' import { Cache } from '../cache' import { IllegalStateException } from '../exception/illegal-state' import { MissingTaskException } from '../exception/missing-item' +import { PremiumVersionMissingException } from '../exception/premium' export async function dispatchReviewChildTaskAction ({ action, cache }: { action: ReviewChildTaskAction cache: Cache }) { + if (action.ok && cache.hasFullVersion === false) { + throw new PremiumVersionMissingException() + } + const taskInfo = await cache.database.childTask.findOne({ where: { familyId: cache.familyId,