Fix build issues
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-12-03 14:53:06 +01:00
parent f6568cf059
commit fb35fca56e
10 changed files with 37 additions and 34 deletions

View File

@@ -45,7 +45,7 @@ export class AuthApi {
uri: "/auth/start_oidc",
method: "GET",
})
).data;
).data as { url: string };
}
/**
@@ -70,7 +70,7 @@ export class AuthApi {
uri: "/auth/info",
method: "GET",
})
).data;
).data as UserInfo;
}
/**

View File

@@ -10,7 +10,7 @@ export class MatrixLinkApi {
uri: "/matrix_link/start_auth",
method: "POST",
})
).data;
).data as { url: string };
}
/**

View File

@@ -29,6 +29,6 @@ export class MatrixSyncApi {
method: "GET",
uri: "/matrix_sync/status",
});
return res.data.started;
return (res.data as { started: boolean }).started;
}
}

View File

@@ -35,7 +35,7 @@ export class ServerApi {
uri: "/server/config",
method: "GET",
})
).data;
).data as ServerConfig;
}
/**

View File

@@ -28,7 +28,7 @@ export class TokensApi {
uri: "/tokens",
method: "GET",
})
).data;
).data as Token[];
}
/**
@@ -41,18 +41,16 @@ export class TokensApi {
method: "POST",
jsonData: t,
})
).data;
).data as TokenWithSecret;
}
/**
* Delete a token
*/
static async Delete(t: Token): Promise<void> {
return (
await APIClient.exec({
uri: `/token/${t.id}`,
method: "DELETE",
})
).data;
await APIClient.exec({
uri: `/token/${t.id}`,
method: "DELETE",
});
}
}

View File

@@ -74,7 +74,7 @@ export class MatrixApiEvent {
`/matrix/room/${encodeURIComponent(room.id)}/events` +
(from ? `?from=${from}` : ""),
})
).data;
).data as MatrixEventsList;
}
/**

View File

@@ -13,13 +13,13 @@ export class MatrixApiProfile {
* Get multiple profiles information
*/
static async GetMultiple(ids: string[]): Promise<UsersMap> {
const list: UserProfile[] = (
const list = (
await APIClient.exec({
method: "POST",
uri: "/matrix/profile/get_multiple",
jsonData: ids,
})
).data;
).data as UserProfile[];
return new Map(list.map((e) => [e.user_id, e]));
}

View File

@@ -57,7 +57,7 @@ export class MatrixApiRoom {
method: "GET",
uri: "/matrix/room/joined",
})
).data;
).data as Room[];
}
/**
@@ -69,6 +69,6 @@ export class MatrixApiRoom {
method: "GET",
uri: `/matrix/room/${room.id}/receipts`,
})
).data;
).data as Receipt[];
}
}