Get rid of some anys.
This commit is contained in:
parent
5592892f0d
commit
d783bb634f
6 changed files with 53 additions and 76 deletions
server/resources
|
@ -10,6 +10,7 @@ import {isMonitoringToken, JSONObject, MonitoringResponse, MonitoringToken, toMo
|
|||
|
||||
const isValidToken = forConstraint(CONSTRAINTS.token, false);
|
||||
|
||||
// FIXME: Get rid of any
|
||||
async function doGetAll(req: Request): Promise<{ total: number, result: any }> {
|
||||
const restParams = await Resources.getValidRestParams('list', null, req);
|
||||
const {monitoringStates, total} = await MonitoringService.getAll(restParams);
|
||||
|
|
|
@ -10,18 +10,18 @@ import {isString, isTaskSortField} from "../types";
|
|||
|
||||
const isValidId = forConstraint(CONSTRAINTS.id, false);
|
||||
|
||||
interface TaskResponse {
|
||||
id: number,
|
||||
name: string,
|
||||
description: string,
|
||||
schedule: string,
|
||||
runningSince: number | null,
|
||||
lastRunStarted: number | null,
|
||||
lastRunDuration: number | null,
|
||||
state: string,
|
||||
result: string | null,
|
||||
message: string | null,
|
||||
enabled: boolean,
|
||||
type TaskResponse = {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
schedule: string;
|
||||
runningSince: number | null;
|
||||
lastRunStarted: number | null;
|
||||
lastRunDuration: number | null;
|
||||
state: string;
|
||||
result: string | null;
|
||||
message: string | null;
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
function toTaskResponse(task: Task): TaskResponse {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue