@things-factory/integration-accounting 9.0.0-beta.30 → 9.0.0-beta.34
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.
|
@@ -8,7 +8,7 @@ const shell_1 = require("@things-factory/shell");
|
|
|
8
8
|
const isPathBaseDomain = !env_1.config.get('subdomain');
|
|
9
9
|
const debug = require('debug')('things-factory:integration-accounting:xero-router');
|
|
10
10
|
exports.xeroPrivateRouter = new koa_router_1.default();
|
|
11
|
-
exports.xeroPrivateRouter.get(`${isPathBaseDomain ?
|
|
11
|
+
exports.xeroPrivateRouter.get(`${isPathBaseDomain ? `/${(0, shell_1.getRoutePrefixForDomainType)()}/:domain` : ''}/callback-private-xero`, async (context, next) => {
|
|
12
12
|
const { domain } = context.state;
|
|
13
13
|
const xeroAccountingCookies = context.cookies.get('xero-accounting');
|
|
14
14
|
const { id, status, message } = JSON.parse(xeroAccountingCookies);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xero-private-router.js","sourceRoot":"","sources":["../../server/routers/xero-private-router.ts"],"names":[],"mappings":";;;;AAAA,oEAA+B;AAE/B,6CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"xero-private-router.js","sourceRoot":"","sources":["../../server/routers/xero-private-router.ts"],"names":[],"mappings":";;;;AAAA,oEAA+B;AAE/B,6CAA4C;AAC5C,iDAA6F;AAE7F,MAAM,gBAAgB,GAAG,CAAC,YAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;AAEjD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,mDAAmD,CAAC,CAAA;AAEtE,QAAA,iBAAiB,GAAG,IAAI,oBAAM,EAAE,CAAA;AAE7C,yBAAiB,CAAC,GAAG,CACnB,GAAG,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAA,mCAA2B,GAAE,UAAU,CAAC,CAAC,CAAC,EAAE,wBAAwB,EAC9F,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEhC,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;IACpE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAA;IAEjE,OAAO,CAAC,QAAQ,CACd,GAAG,IAAA,gCAAwB,EACzB,OAAO,EACP,MAAM,CACP,gBAAgB,EAAE,4BAA4B,MAAM,YAAY,OAAO,EAAE,CAC3E,CAAA;AACH,CAAC,CACF,CAAA","sourcesContent":["import Router from 'koa-router'\n\nimport { config } from '@things-factory/env'\nimport { getRedirectSubdomainPath, getRoutePrefixForDomainType } from '@things-factory/shell'\n\nconst isPathBaseDomain = !config.get('subdomain')\n\nconst debug = require('debug')('things-factory:integration-accounting:xero-router')\n\nexport const xeroPrivateRouter = new Router()\n\nxeroPrivateRouter.get(\n `${isPathBaseDomain ? `/${getRoutePrefixForDomainType()}/:domain` : ''}/callback-private-xero`,\n async (context, next) => {\n const { domain } = context.state\n\n const xeroAccountingCookies = context.cookies.get('xero-accounting')\n const { id, status, message } = JSON.parse(xeroAccountingCookies)\n\n context.redirect(\n `${getRedirectSubdomainPath(\n context,\n domain\n )}account-xero/${id}/connect-callback?status=${status}&message=${message}`\n )\n }\n)\n"]}
|