Add user flags field

This commit is contained in:
Jonas Lochmann
2020-06-01 02:00:00 +02:00
parent 7b6527752e
commit 12dc22f8a2
26 changed files with 661 additions and 54 deletions
+5 -1
View File
@@ -55,6 +55,7 @@ import { SerialiizedUpdateNetworkTimeVerificationAction, UpdateNetworkTimeVerifi
import { SerializedUpdateParentBlockedTimesAction, UpdateParentBlockedTimesAction } from '../updateparentblockedtimes'
import { SerializedUpdateParentNotificationFlagsAction, UpdateParentNotificationFlagsAction } from '../updateparentnotificationflags'
import { SerializedUpdateTimelimitRuleAction, UpdateTimelimitRuleAction } from '../updatetimelimitrule'
import { SerializedUpdateUserFlagsAction, UpdateUserFlagsAction } from '../updateuserflags'
export type SerializedParentAction =
SerializedAddCategoryAppsAction |
@@ -95,7 +96,8 @@ export type SerializedParentAction =
SerialiizedUpdateNetworkTimeVerificationAction |
SerializedUpdateParentBlockedTimesAction |
SerializedUpdateParentNotificationFlagsAction |
SerializedUpdateTimelimitRuleAction
SerializedUpdateTimelimitRuleAction |
SerializedUpdateUserFlagsAction
export const parseParentAction = (action: SerializedParentAction): ParentAction => {
if (action.type === 'ADD_CATEGORY_APPS') {
@@ -176,6 +178,8 @@ export const parseParentAction = (action: SerializedParentAction): ParentAction
return UpdateParentNotificationFlagsAction.parse(action)
} else if (action.type === 'UPDATE_TIMELIMIT_RULE') {
return UpdateTimelimitRuleAction.parse(action)
} else if (action.type === 'UPDATE_USER_FLAGS') {
return UpdateUserFlagsAction.parse(action)
} else {
throw new Error('illegal state: invalid type for action at parseParentAction')
}