我收到這個錯誤,我被困無法找到語法問題在哪里
core.mjs:6495 錯誤語法錯誤:正則運算式無效:/https://graph.microsoft.com/v1.0/communications/callRecords/getPstnCalls(fromDateTime=2020-01-30,toDateTime=2020-01-30/:未終止組 at new RegExp () at Function.StringUtils.matchPattern (StringUtils.js:122) at azure-msal-angular.js:425 at Array.forEach () at MsalInterceptor.matchResourcesToEndpoint (azure-msal-angular.js:422) ) 在 MsalInterceptor.getScopesForEndpoint (azure-msal-angular.js:404) at MsalInterceptor.intercept (azure-msal-angular.js:336) at HttpInterceptorHandler.handle (http.mjs:1415) at HttpXsrfInterceptor.intercept (http.mjs) :2018) 在 HttpInterceptorHandler.handle (http.mjs:1415)
export function MSALInterceptorConfigFactory(): MsalInterceptorConfiguration {
var fromDatetimeVariable ='2020-01-30';
var toDatetimeVariable='2020-01-30';
let queryUrl = `https://graph.microsoft.com/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${fromDatetimeVariable},toDateTime=${toDatetimeVariable}`
const protectedResourceMap = new Map<string, Array<string>>();
protectedResourceMap.set(queryUrl, ['CallRecords.Read.All', 'CallRecord-PstnCalls.Read.All']);
// protectedResourceMap.set('https://graph.microsoft.com/v1.0/me', ['CallRecord-PstnCalls.Read.All', 'mail.read']);
// protectedResourceMap.set('http://localhost:8080/hello', ['api://d16e1a06-3be2-4ae1-8bd4-718c19cecac3/hello']);
return {
interactionType: InteractionType.Popup,
protectedResourceMap
};
}
uj5u.com熱心網友回復:
您錯過了關閉 queryUrl 值中的括號。要糾正此問題,您的 queryUrl 值必須類似于:
let queryUrl = `https://graph.microsoft.com/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${fromDatetimeVariable},toDateTime=${toDatetimeVariable})`
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/369136.html
標籤:有角的 打字稿 microsoft-graph-api 语法错误 msal.js
上一篇:TypeScript中的條件道具
