-
Notifications
You must be signed in to change notification settings - Fork 4
feat:Modifying the return value of multi permission requests #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
feat:func "checkMultiple" reutrn {Permission[1]:GrantStatus...} |
feat:func "requestMultiple" reutrn {Permission[1]:GrantStatus...} |
3b9b235
to
c29d179
Compare
let Status = await atManager.checkAccessToken(tokenId, permissions[index]); | ||
grantStatus.push(this.checkStatus(Status)); | ||
const Status = await atManager.checkAccessToken(tokenId, permissions[index]); | ||
grantStatus[permissions[index]]=this.checkStatus(Status); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
少空格
let atManager: abilityAccessCtrl.AtManager = abilityAccessCtrl.createAtManager(); | ||
let resultsStatus: GrantStatus[] = []; | ||
type PermissionStatusRecord = Record<string, GrantStatus>; | ||
let resultsStatus:PermissionStatusRecord= { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
少空格,可合并
let resultsStatus: Record<string, GrantStatus> = {};
for (let index = 0; index < resultData.authResults.length; index++) { | ||
resultsStatus.push(this.checkStatus(resultData.authResults[index])); | ||
const status = this.checkStatus(resultData.authResults[index]); | ||
resultsStatus[permissions[index]]=status; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
少空格
} | ||
} | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无意义修改
/** | ||
* 请求多个权限 | ||
*/ | ||
async requestMultiple(permissions: Array<Permissions>): Promise<Object> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async requestMultiple(permissions: Array): Promise<Record<string, GrantStatus>?
feat:多请求返回值类型修改