@smartsoft001/google 2.152.0 → 2.154.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/google",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.154.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./src/index.d.ts",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"homepage": "https://github.com/emiljuchnikowski/smartsoft#readme",
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@nestjs/axios": "^4.0.1",
|
|
23
|
-
"@nestjs/common": "^11.1.5"
|
|
23
|
+
"@nestjs/common": "^11.1.5",
|
|
24
|
+
"rxjs": "^7.8.1"
|
|
24
25
|
},
|
|
25
26
|
"types": "./src/index.d.ts"
|
|
26
27
|
}
|
|
@@ -2,23 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GoogleService = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const common_1 = require("@nestjs/common");
|
|
6
5
|
const axios_1 = require("@nestjs/axios");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const rxjs_1 = require("rxjs");
|
|
7
8
|
let GoogleService = class GoogleService {
|
|
8
9
|
http;
|
|
9
10
|
constructor(http) {
|
|
10
11
|
this.http = http;
|
|
11
12
|
}
|
|
12
13
|
async getUserId(token) {
|
|
13
|
-
const { data } = await this.http
|
|
14
|
-
.get('https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=' + token)
|
|
15
|
-
.toPromise();
|
|
14
|
+
const { data } = await (0, rxjs_1.firstValueFrom)(this.http.get('https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=' + token));
|
|
16
15
|
return data.user_id;
|
|
17
16
|
}
|
|
18
17
|
async getData(token) {
|
|
19
|
-
const { data } = await this.http
|
|
20
|
-
.get('https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=' + token)
|
|
21
|
-
.toPromise();
|
|
18
|
+
const { data } = await (0, rxjs_1.firstValueFrom)(this.http.get('https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=' + token));
|
|
22
19
|
return {
|
|
23
20
|
id: data.user_id,
|
|
24
21
|
email: data.email,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.service.js","sourceRoot":"","sources":["../../../../../../packages/shared/google/src/lib/google.service.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"google.service.js","sourceRoot":"","sources":["../../../../../../packages/shared/google/src/lib/google.service.ts"],"names":[],"mappings":";;;;AAAA,yCAA4C;AAC5C,2CAA4C;AAC5C,+BAAsC;AAG/B,IAAM,aAAa,GAAnB,MAAM,aAAa;IACJ;IAApB,YAAoB,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;IAAG,CAAC;IAEzC,KAAK,CAAC,SAAS,CAAC,KAAa;QAC3B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,qBAAc,EACnC,IAAI,CAAC,IAAI,CAAC,GAAG,CACX,8DAA8D,GAAG,KAAK,CACvE,CACF,CAAC;QAEF,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAAa;QACzB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,qBAAc,EACnC,IAAI,CAAC,IAAI,CAAC,GAAG,CACX,8DAA8D,GAAG,KAAK,CACvE,CACF,CAAC;QAEF,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,OAAO;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF,CAAA;AAzBY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;6CAEe,mBAAW;GAD1B,aAAa,CAyBzB"}
|