directus-sdk-node
Advanced tools
Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "directus-sdk-node", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "A JavaScript client for the Directus API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,4 @@ # Directus SDK for Node | ||
[![NPM](https://nodei.co/npm/directus-sdk-node.png)](https://nodei.co/npm/directus-sdk-node/) | ||
## Work in progress | ||
@@ -7,0 +9,0 @@ |
@@ -35,3 +35,7 @@ const vsprintf = require('sprintf-js').vsprintf; | ||
} else { | ||
this.baseEndpoint = `${args.options.baseUrl.replace(/\/$/g, '')}/${this.apiVersion}/`; | ||
if(args.options.baseUrl.match(/api\/?$/)) { | ||
this.baseEndpoint = `${args.options.baseUrl.replace(/\/$/g, '')}/${this.apiVersion}/`; | ||
} else { | ||
this.baseEndpoint = `${args.options.baseUrl.replace(/\/$/g, '')}/api/${this.apiVersion}/`; | ||
} | ||
} | ||
@@ -38,0 +42,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53578
1391
152