mirror of
https://github.com/koush/scrypted.git
synced 2026-07-10 00:40:38 +01:00
google-device-access: request logging
This commit is contained in:
4
plugins/google-device-access/package-lock.json
generated
4
plugins/google-device-access/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/google-device-access",
|
||||
"version": "0.0.92",
|
||||
"version": "0.0.93",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/google-device-access",
|
||||
"version": "0.0.92",
|
||||
"version": "0.0.93",
|
||||
"dependencies": {
|
||||
"@googleapis/smartdevicemanagement": "^0.2.0",
|
||||
"axios": "^0.21.1",
|
||||
|
||||
@@ -49,5 +49,5 @@
|
||||
"@types/node": "^14.17.11",
|
||||
"@types/url-parse": "^1.4.3"
|
||||
},
|
||||
"version": "0.0.92"
|
||||
"version": "0.0.93"
|
||||
}
|
||||
|
||||
@@ -692,6 +692,7 @@ class GoogleSmartDeviceAccess extends ScryptedDeviceBase implements OauthClient,
|
||||
}
|
||||
|
||||
async authGet(path: string) {
|
||||
this.console.log('SDM request', path);
|
||||
await this.loadToken();
|
||||
return axios(`https://${this.apiHostname}/v1/enterprises/${this.projectId}${path}`, {
|
||||
headers: {
|
||||
@@ -701,6 +702,7 @@ class GoogleSmartDeviceAccess extends ScryptedDeviceBase implements OauthClient,
|
||||
}
|
||||
|
||||
async authPost(path: string, data: any) {
|
||||
this.console.log('SDM request', path);
|
||||
await this.loadToken();
|
||||
return axios.post(`https://${this.apiHostname}/v1/enterprises/${this.projectId}${path}`, data, {
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user