mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-03-06 09:58:25 +00:00
Fix strict compile issue
This commit is contained in:
parent
d666e26931
commit
ba243f7232
@ -23,12 +23,6 @@ const requestFabricToken = async (): Promise<void> => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!userContext.fabricContext || !userContext.databaseAccount) {
|
|
||||||
// This should not happen
|
|
||||||
logConsoleError("Fabric context or database account is missing: cannot request tokens");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
lastRequestTimestamp = Date.now();
|
lastRequestTimestamp = Date.now();
|
||||||
try {
|
try {
|
||||||
if (isFabricMirrored()) {
|
if (isFabricMirrored()) {
|
||||||
@ -47,6 +41,12 @@ const requestFabricToken = async (): Promise<void> => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const requestAndStoreDatabaseResourceTokens = async (): Promise<void> => {
|
const requestAndStoreDatabaseResourceTokens = async (): Promise<void> => {
|
||||||
|
if (!userContext.fabricContext || !userContext.databaseAccount) {
|
||||||
|
// This should not happen
|
||||||
|
logConsoleError("Fabric context or database account is missing: cannot request tokens");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const resourceTokenInfo = await sendCachedDataMessage<ResourceTokenInfo>(
|
const resourceTokenInfo = await sendCachedDataMessage<ResourceTokenInfo>(
|
||||||
FabricMessageTypes.GetAllResourceTokens,
|
FabricMessageTypes.GetAllResourceTokens,
|
||||||
[],
|
[],
|
||||||
@ -88,11 +88,13 @@ const requestAndStoreDatabaseResourceTokens = async (): Promise<void> => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const requestAndStoreAccessToken = async (): Promise<void> => {
|
const requestAndStoreAccessToken = async (): Promise<void> => {
|
||||||
const accessTokenInfo = await sendCachedDataMessage<{ accessToken: string }>(
|
if (!userContext.fabricContext || !userContext.databaseAccount) {
|
||||||
FabricMessageTypes.GetAccessToken,
|
// This should not happen
|
||||||
[],
|
logConsoleError("Fabric context or database account is missing: cannot request tokens");
|
||||||
userContext.fabricContext.artifactInfo?.connectionId,
|
return;
|
||||||
);
|
}
|
||||||
|
|
||||||
|
const accessTokenInfo = await sendCachedDataMessage<{ accessToken: string }>(FabricMessageTypes.GetAccessToken, []);
|
||||||
|
|
||||||
updateUserContext({
|
updateUserContext({
|
||||||
aadToken: accessTokenInfo.accessToken,
|
aadToken: accessTokenInfo.accessToken,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user