@byu-oit/canvas-sdk
Advanced tools
Comparing version 0.1.15 to 0.1.16
{ | ||
"name": "@byu-oit/canvas-sdk", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"description": "A wrapper around Instructure's Canvas API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -44,5 +44,15 @@ 'use strict'; | ||
accounts.getAdmins = async function(accountId = 1) { | ||
return await canvas.request('GET', `accounts/${accountId}/admins`); | ||
return await canvas.requestAll(`accounts/${accountId}/admins`); | ||
}; | ||
accounts.isAdmin = async function(sisUserId) { | ||
const admins = await accounts.getAdmins(); | ||
for(let admin of admins) { | ||
if(admin.user.sis_user_id === sisUserId) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
}; | ||
accounts.delete = async function(sisAccountId) { | ||
@@ -49,0 +59,0 @@ const newId = uuid(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52048
855