File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ export interface IMusicBrainzConfig {
131131 username ?: string ,
132132 password ?: string
133133 } ,
134- baseUrl : string ,
134+ baseUrl ? : string ,
135135
136136 appName ?: string ,
137137 appVersion ?: string ,
@@ -149,6 +149,10 @@ export interface IMusicBrainzConfig {
149149 disableRateLimiting ?: boolean
150150}
151151
152+ interface IInternalConfig extends IMusicBrainzConfig {
153+ baseUrl : string ,
154+ }
155+
152156export interface ICsrfSession {
153157 sessionKey : string ;
154158 token : string ;
@@ -161,9 +165,7 @@ export interface ISessionInformation {
161165
162166export class MusicBrainzApi {
163167
164- public readonly config : IMusicBrainzConfig = {
165- baseUrl : 'https://musicbrainz.org'
166- } ;
168+ public readonly config : IInternalConfig ;
167169
168170 private rateLimiter : RateLimitThreshold ;
169171 private httpClient : HttpClient ;
@@ -190,7 +192,12 @@ export class MusicBrainzApi {
190192
191193 public constructor ( _config ?: IMusicBrainzConfig ) {
192194
193- Object . assign ( this . config , _config ) ;
195+ this . config = {
196+ ...{
197+ baseUrl : 'https://musicbrainz.org'
198+ } ,
199+ ..._config
200+ }
194201
195202 this . httpClient = new HttpClient ( {
196203 baseUrl : this . config . baseUrl ,
You can’t perform that action at this time.
0 commit comments