mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Replace tslint by eslint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* Copyright (C) 2019 - 2020 Jonas Lochmann
|
||||
* Copyright (C) 2019 - 2022 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -18,13 +18,11 @@
|
||||
import { ChildAction } from './basetypes'
|
||||
|
||||
export class ChildSignInAction extends ChildAction {
|
||||
static instance = new ChildSignInAction()
|
||||
|
||||
constructor () {
|
||||
super()
|
||||
}
|
||||
|
||||
static parse = (_: SerializedChildSignInAction) => (
|
||||
new ChildSignInAction()
|
||||
)
|
||||
}
|
||||
|
||||
export interface SerializedChildSignInAction {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* Copyright (C) 2019 - 2020 Jonas Lochmann
|
||||
* Copyright (C) 2019 - 2022 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -23,8 +23,6 @@ export class ForceSyncAction extends AppLogicAction {
|
||||
private constructor () {
|
||||
super()
|
||||
}
|
||||
|
||||
static parse = (_: SerializedForceSyncAction) => ForceSyncAction.instance
|
||||
}
|
||||
|
||||
export interface SerializedForceSyncAction {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* Copyright (C) 2019 - 2020 Jonas Lochmann
|
||||
* Copyright (C) 2019 - 2022 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -48,13 +48,13 @@ export const parseAppLogicAction = (serialized: SerializedAppLogicAction): AppLo
|
||||
} else if (serialized.type === 'ADD_INSTALLED_APPS') {
|
||||
return AddInstalledAppsAction.parse(serialized)
|
||||
} else if (serialized.type === 'FORCE_SYNC') {
|
||||
return ForceSyncAction.parse(serialized)
|
||||
return ForceSyncAction.instance
|
||||
} else if (serialized.type === 'MARK_TASK_PENDING') {
|
||||
return MarkTaskPendingAction.parse(serialized)
|
||||
} else if (serialized.type === 'REMOVE_INSTALLED_APPS') {
|
||||
return RemoveInstalledAppsAction.parse(serialized)
|
||||
} else if (serialized.type === 'SIGN_OUT_AT_DEVICE') {
|
||||
return SignOutAtDeviceAction.parse(serialized)
|
||||
return SignOutAtDeviceAction.instance
|
||||
} else if (serialized.type === 'TRIED_DISABLING_DEVICE_ADMIN') {
|
||||
return new TriedDisablingDeviceAdminAction()
|
||||
} else if (serialized.type === 'UPDATE_APP_ACTIVITIES') {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* Copyright (C) 2019 - 2020 Jonas Lochmann
|
||||
* Copyright (C) 2019 - 2022 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -25,7 +25,7 @@ export const parseChildAction = (serialized: SerializedChildAction) => {
|
||||
if (serialized.type === 'CHILD_CHANGE_PASSWORD') {
|
||||
return ChildChangePasswordAction.parse(serialized)
|
||||
} else if (serialized.type === 'CHILD_SIGN_IN') {
|
||||
return ChildSignInAction.parse(serialized)
|
||||
return ChildSignInAction.instance
|
||||
} else {
|
||||
throw new UnknownActionTypeException({ group: 'child' })
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@ export class SignOutAtDeviceAction extends AppLogicAction {
|
||||
private constructor () {
|
||||
super()
|
||||
}
|
||||
|
||||
static parse = (_: SerializedSignOutAtDeviceAction) => SignOutAtDeviceAction.instance
|
||||
}
|
||||
|
||||
export interface SerializedSignOutAtDeviceAction {
|
||||
|
||||
Reference in New Issue
Block a user