Require the premium version for confirming the completion of tasks

This commit is contained in:
Jonas Lochmann
2020-11-23 01:00:00 +01:00
parent d67b7a7619
commit 2a8250c9f7
@@ -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,