phx-react 1.3.364 → 1.3.365
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/dist/cjs/components/Func/getHttpLinkConfig.js +4 -1
- package/dist/cjs/components/Func/getHttpLinkConfig.js.map +1 -1
- package/dist/cjs/utils/queryLogin.js +1 -1
- package/dist/cjs/utils/queryLogin.js.map +1 -1
- package/dist/esm/components/Func/getHttpLinkConfig.js +4 -1
- package/dist/esm/components/Func/getHttpLinkConfig.js.map +1 -1
- package/dist/esm/utils/queryLogin.js +1 -1
- package/dist/esm/utils/queryLogin.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,10 @@ var read_env_config_1 = require("../../read-env-config");
|
|
|
8
8
|
function PHXGetHttpLinkConfig() {
|
|
9
9
|
var uri = (0, read_env_config_1.getEnv)('NEXT_PUBLIC_GRAPHQL_API', process.env.NEXT_PUBLIC_GRAPHQL_API);
|
|
10
10
|
var authTokenInfo = js_cookie_1["default"].get(constants_1.AUTH_TOKEN) && JSON.parse(js_cookie_1["default"].get(constants_1.AUTH_TOKEN));
|
|
11
|
-
var httpLink = new client_1.HttpLink(
|
|
11
|
+
var httpLink = new client_1.HttpLink({
|
|
12
|
+
uri: uri
|
|
13
|
+
});
|
|
14
|
+
console.log('httpLink', httpLink);
|
|
12
15
|
if (js_cookie_1["default"].get(constants_1.AUTH_TOKEN)) {
|
|
13
16
|
httpLink = new client_1.HttpLink({
|
|
14
17
|
uri: uri,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHttpLinkConfig.js","sourceRoot":"","sources":["../../../../src/components/Func/getHttpLinkConfig.ts"],"names":[],"mappings":";;;AAAA,gEAA+B;AAC/B,mDAAkD;AAClD,yCAAyC;AACzC,yDAA8C;AAE9C,SAAwB,oBAAoB;IAC1C,IAAM,GAAG,GAAG,IAAA,wBAAM,EAAC,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;IAClF,IAAM,aAAa,GAAG,sBAAO,CAAC,GAAG,CAAC,sBAAU,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,sBAAO,CAAC,GAAG,CAAC,sBAAU,CAAW,CAAC,CAAA;IAC9F,IAAI,QAAQ,GAAG,IAAI,iBAAQ,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"getHttpLinkConfig.js","sourceRoot":"","sources":["../../../../src/components/Func/getHttpLinkConfig.ts"],"names":[],"mappings":";;;AAAA,gEAA+B;AAC/B,mDAAkD;AAClD,yCAAyC;AACzC,yDAA8C;AAE9C,SAAwB,oBAAoB;IAC1C,IAAM,GAAG,GAAG,IAAA,wBAAM,EAAC,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;IAClF,IAAM,aAAa,GAAG,sBAAO,CAAC,GAAG,CAAC,sBAAU,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,sBAAO,CAAC,GAAG,CAAC,sBAAU,CAAW,CAAC,CAAA;IAC9F,IAAI,QAAQ,GAAG,IAAI,iBAAQ,CAAC;QAC1B,GAAG,KAAA;KACJ,CAAC,CAAA;IACF,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;IACjC,IAAI,sBAAO,CAAC,GAAG,CAAC,sBAAU,CAAC,EAAE;QAC3B,QAAQ,GAAG,IAAI,iBAAQ,CAAC;YACtB,GAAG,KAAA;YACH,OAAO,EAAE;gBACP,aAAa,EAAE,aAAa,CAAC,KAAK;gBAClC,kBAAkB,EAAE,aAAa,CAAC,MAAM;aACzC;SACF,CAAC,CAAA;KACH;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAjBD,0CAiBC"}
|
|
@@ -3,7 +3,7 @@ exports.__esModule = true;
|
|
|
3
3
|
exports.getOTP = exports.insertOTP = exports.updatePassword = exports.verifyEmail = exports.getUserInfoPn28 = exports.getUserInfo = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var client_1 = require("@apollo/client");
|
|
6
|
-
exports.getUserInfo = (0, client_1.gql)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n query MyQuery($userId: Int
|
|
6
|
+
exports.getUserInfo = (0, client_1.gql)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n query MyQuery($userId: Int) {\n users(where: { id: { _eq: $userId } }) {\n id\n email\n phone_number\n full_name\n school_id\n school {\n school_name_id\n email\n id\n phone\n name\n school_name {\n name\n group_id\n }\n }\n user_roles(where: { is_active: { _eq: true } }) {\n role_id\n role {\n role_code\n }\n }\n }\n }\n"], ["\n query MyQuery($userId: Int) {\n users(where: { id: { _eq: $userId } }) {\n id\n email\n phone_number\n full_name\n school_id\n school {\n school_name_id\n email\n id\n phone\n name\n school_name {\n name\n group_id\n }\n }\n user_roles(where: { is_active: { _eq: true } }) {\n role_id\n role {\n role_code\n }\n }\n }\n }\n"])));
|
|
7
7
|
exports.getUserInfoPn28 = (0, client_1.gql)(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n query MyQuery($email: String, $password: String) {\n users(where: { email: { _eq: $email }, password: { _eq: $password }, deleted_at: { _is_null: true } }) {\n id\n email\n password\n }\n }\n"], ["\n query MyQuery($email: String, $password: String) {\n users(where: { email: { _eq: $email }, password: { _eq: $password }, deleted_at: { _is_null: true } }) {\n id\n email\n password\n }\n }\n"])));
|
|
8
8
|
exports.verifyEmail = (0, client_1.gql)(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n query VerityEmail($email: String) {\n users(where: { email: { _eq: $email } }) {\n id\n email\n }\n }\n"], ["\n query VerityEmail($email: String) {\n users(where: { email: { _eq: $email } }) {\n id\n email\n }\n }\n"])));
|
|
9
9
|
exports.updatePassword = (0, client_1.gql)(templateObject_4 || (templateObject_4 = tslib_1.__makeTemplateObject(["\n mutation UpdatePassword($id: Int!, $password: String) {\n update_users_by_pk(_set: { password: $password }, pk_columns: { id: $id }) {\n id\n password\n }\n }\n"], ["\n mutation UpdatePassword($id: Int!, $password: String) {\n update_users_by_pk(_set: { password: $password }, pk_columns: { id: $id }) {\n id\n password\n }\n }\n"])));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryLogin.js","sourceRoot":"","sources":["../../../src/utils/queryLogin.ts"],"names":[],"mappings":";;;;AAAA,yCAAoC;AAEvB,QAAA,WAAW,OAAG,YAAG
|
|
1
|
+
{"version":3,"file":"queryLogin.js","sourceRoot":"","sources":["../../../src/utils/queryLogin.ts"],"names":[],"mappings":";;;;AAAA,yCAAoC;AAEvB,QAAA,WAAW,OAAG,YAAG,0iBAAA,8dA2B7B,KAAA;AAEY,QAAA,eAAe,OAAG,YAAG,uSAAA,2NAQjC,KAAA;AAEY,QAAA,WAAW,OAAG,YAAG,0MAAA,8HAO7B,KAAA;AAEY,QAAA,cAAc,OAAG,YAAG,mQAAA,uLAOhC,KAAA;AAEY,QAAA,SAAS,OAAG,YAAG,+XAAA,mTAU3B,KAAA;AAEY,QAAA,MAAM,OAAG,YAAG,gPAAA,oKAQxB,KAAA"}
|
|
@@ -5,7 +5,10 @@ import { getEnv } from '../../read-env-config';
|
|
|
5
5
|
export default function PHXGetHttpLinkConfig() {
|
|
6
6
|
var uri = getEnv('NEXT_PUBLIC_GRAPHQL_API', process.env.NEXT_PUBLIC_GRAPHQL_API);
|
|
7
7
|
var authTokenInfo = Cookies.get(AUTH_TOKEN) && JSON.parse(Cookies.get(AUTH_TOKEN));
|
|
8
|
-
var httpLink = new HttpLink(
|
|
8
|
+
var httpLink = new HttpLink({
|
|
9
|
+
uri: uri
|
|
10
|
+
});
|
|
11
|
+
console.log('httpLink', httpLink);
|
|
9
12
|
if (Cookies.get(AUTH_TOKEN)) {
|
|
10
13
|
httpLink = new HttpLink({
|
|
11
14
|
uri: uri,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHttpLinkConfig.js","sourceRoot":"","sources":["../../../../src/components/Func/getH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E,QAAQ,CAAC,CAAA;IACjC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;QAC3B,QAAQ,GAAG,IAAI,QAAQ,CAAC;YACtB,GAAG,KAAA;YACH,OAAO,EAAE;gBACP,aAAa,EAAE,aAAa,CAAC,KAAK;gBAClC,kBAAkB,EAAE,aAAa,CAAC,MAAM;aACzC;SACF,CAAC,CAAA;KACH;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __makeTemplateObject } from "tslib";
|
|
2
2
|
import { gql } from '@apollo/client';
|
|
3
|
-
export var getUserInfo = gql(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query MyQuery($userId: Int
|
|
3
|
+
export var getUserInfo = gql(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query MyQuery($userId: Int) {\n users(where: { id: { _eq: $userId } }) {\n id\n email\n phone_number\n full_name\n school_id\n school {\n school_name_id\n email\n id\n phone\n name\n school_name {\n name\n group_id\n }\n }\n user_roles(where: { is_active: { _eq: true } }) {\n role_id\n role {\n role_code\n }\n }\n }\n }\n"], ["\n query MyQuery($userId: Int) {\n users(where: { id: { _eq: $userId } }) {\n id\n email\n phone_number\n full_name\n school_id\n school {\n school_name_id\n email\n id\n phone\n name\n school_name {\n name\n group_id\n }\n }\n user_roles(where: { is_active: { _eq: true } }) {\n role_id\n role {\n role_code\n }\n }\n }\n }\n"])));
|
|
4
4
|
export var getUserInfoPn28 = gql(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query MyQuery($email: String, $password: String) {\n users(where: { email: { _eq: $email }, password: { _eq: $password }, deleted_at: { _is_null: true } }) {\n id\n email\n password\n }\n }\n"], ["\n query MyQuery($email: String, $password: String) {\n users(where: { email: { _eq: $email }, password: { _eq: $password }, deleted_at: { _is_null: true } }) {\n id\n email\n password\n }\n }\n"])));
|
|
5
5
|
export var verifyEmail = gql(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query VerityEmail($email: String) {\n users(where: { email: { _eq: $email } }) {\n id\n email\n }\n }\n"], ["\n query VerityEmail($email: String) {\n users(where: { email: { _eq: $email } }) {\n id\n email\n }\n }\n"])));
|
|
6
6
|
export var updatePassword = gql(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n mutation UpdatePassword($id: Int!, $password: String) {\n update_users_by_pk(_set: { password: $password }, pk_columns: { id: $id }) {\n id\n password\n }\n }\n"], ["\n mutation UpdatePassword($id: Int!, $password: String) {\n update_users_by_pk(_set: { password: $password }, pk_columns: { id: $id }) {\n id\n password\n }\n }\n"])));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryLogin.js","sourceRoot":"","sources":["../../../src/utils/queryLogin.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,IAAM,WAAW,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"queryLogin.js","sourceRoot":"","sources":["../../../src/utils/queryLogin.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,IAAM,WAAW,GAAG,GAAG,iiBAAA,8dA2B7B,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,eAAe,GAAG,GAAG,8RAAA,2NAQjC,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,WAAW,GAAG,GAAG,iMAAA,8HAO7B,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,cAAc,GAAG,GAAG,0PAAA,uLAOhC,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,SAAS,GAAG,GAAG,sXAAA,mTAU3B,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,MAAM,GAAG,GAAG,uOAAA,oKAQxB,IAAA,CAAA"}
|