File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " webflow-api" ,
33 "description" : " Webflow's official Node.js SDK for Data APIs" ,
4- "version" : " 1.0.2 " ,
4+ "version" : " 1.0.3 " ,
55 "types" : " index.d.ts" ,
66 "main" : " dist/index.js" ,
77 "contributors" : [
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ export class Webflow {
265265 if ( state ) query . set ( "state" , state ) ;
266266 if ( scope ) query . set ( "scope" , scope ) ;
267267
268- return `https://${ this . host } /oauth/authorize?${ query } ` ;
268+ return `https://${ this . client . host } /oauth/authorize?${ query } ` ;
269269 }
270270
271271 accessToken ( {
Original file line number Diff line number Diff line change @@ -4,12 +4,13 @@ import { OAuthFixture } from "./OAuth.fixture";
44import Webflow from "../src" ;
55
66describe ( "OAuth" , ( ) => {
7+ const host = "test.com" ;
78 let webflow ;
89 let api ;
910
1011 beforeEach ( ( ) => {
11- api = nock ( " https://api.webflow.com" ) ;
12- webflow = new Webflow ( { token : "token" } ) ;
12+ api = nock ( ` https://api.${ host } ` ) ;
13+ webflow = new Webflow ( { token : "token" , host } ) ;
1314 } ) ;
1415
1516 it ( "should generate an authorization url" , ( ) => {
@@ -30,7 +31,7 @@ describe("OAuth", () => {
3031 } ) ;
3132
3233 expect ( url ) . toBeDefined ( ) ;
33- expect ( url ) . toBe ( `https://${ webflow . host } /oauth/authorize?${ query } ` ) ;
34+ expect ( url ) . toBe ( `https://${ host } /oauth/authorize?${ query } ` ) ;
3435 } ) ;
3536
3637 it ( "should generate an access token" , async ( ) => {
You can’t perform that action at this time.
0 commit comments