@things-factory/integration-accounting 8.0.7 → 8.0.8

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": "@things-factory/integration-accounting",
3
- "version": "8.0.7",
3
+ "version": "8.0.8",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -26,17 +26,17 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@operato/data-grist": "^8.0.0",
29
- "@things-factory/apptool-ui": "^8.0.5",
30
- "@things-factory/auth-ui": "^8.0.5",
31
- "@things-factory/biz-base": "^8.0.6",
32
- "@things-factory/code-ui": "^8.0.5",
33
- "@things-factory/context-ui": "^8.0.2",
34
- "@things-factory/i18n-base": "^8.0.5",
35
- "@things-factory/integration-ui": "^8.0.5",
36
- "@things-factory/more-ui": "^8.0.2",
37
- "@things-factory/product-base": "^8.0.7",
38
- "@things-factory/resource-ui": "^8.0.5",
39
- "@things-factory/setting-ui": "^8.0.5",
29
+ "@things-factory/apptool-ui": "^8.0.8",
30
+ "@things-factory/auth-ui": "^8.0.8",
31
+ "@things-factory/biz-base": "^8.0.8",
32
+ "@things-factory/code-ui": "^8.0.8",
33
+ "@things-factory/context-ui": "^8.0.8",
34
+ "@things-factory/i18n-base": "^8.0.8",
35
+ "@things-factory/integration-ui": "^8.0.8",
36
+ "@things-factory/more-ui": "^8.0.8",
37
+ "@things-factory/product-base": "^8.0.8",
38
+ "@things-factory/resource-ui": "^8.0.8",
39
+ "@things-factory/setting-ui": "^8.0.8",
40
40
  "debug": "^4.1.1",
41
41
  "node-fetch": "^2.6.0"
42
42
  },
@@ -50,5 +50,5 @@
50
50
  "nock": "^13.0.2",
51
51
  "should": "^13.2.3"
52
52
  },
53
- "gitHead": "5781b9a7495a46a8d62ca2c94acdea6da2aece0c"
53
+ "gitHead": "2f53ec5833616a278c1f5fc057a5ce50f309cebd"
54
54
  }
@@ -3,22 +3,25 @@ import Router from 'koa-router'
3
3
  import { config } from '@things-factory/env'
4
4
  import { getRedirectSubdomainPath } from '@things-factory/shell'
5
5
 
6
- const isPathBaseDomain = !config.get('subdomain') && !config.get('useVirtualHostBasedDomain')
6
+ const isPathBaseDomain = !config.get('subdomain')
7
7
 
8
8
  const debug = require('debug')('things-factory:integration-accounting:xero-router')
9
9
 
10
10
  export const xeroPrivateRouter = new Router()
11
11
 
12
- xeroPrivateRouter.get(`${isPathBaseDomain ? '/domain/:domain' : ''}/callback-private-xero`, async (context, next) => {
13
- const { domain } = context.state
12
+ xeroPrivateRouter.get(
13
+ `${isPathBaseDomain ? '/:domainType/:domain' : ''}/callback-private-xero`,
14
+ async (context, next) => {
15
+ const { domain } = context.state
14
16
 
15
- const xeroAccountingCookies = context.cookies.get('xero-accounting')
16
- const { id, status, message } = JSON.parse(xeroAccountingCookies)
17
+ const xeroAccountingCookies = context.cookies.get('xero-accounting')
18
+ const { id, status, message } = JSON.parse(xeroAccountingCookies)
17
19
 
18
- context.redirect(
19
- `${getRedirectSubdomainPath(
20
- context,
21
- domain.subdomain
22
- )}account-xero/${id}/connect-callback?status=${status}&message=${message}`
23
- )
24
- })
20
+ context.redirect(
21
+ `${getRedirectSubdomainPath(
22
+ context,
23
+ domain
24
+ )}account-xero/${id}/connect-callback?status=${status}&message=${message}`
25
+ )
26
+ }
27
+ )