javascript-ampache 1.1.7 → 1.1.9
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.m.js +1 -1
- package/dist/index.m.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/base.ts +8 -3
package/package.json
CHANGED
package/src/base.ts
CHANGED
|
@@ -65,7 +65,7 @@ export abstract class Base {
|
|
|
65
65
|
|
|
66
66
|
if (this.debug) {
|
|
67
67
|
console.debug(
|
|
68
|
-
"javascript-ampache query URL %c" + url
|
|
68
|
+
"javascript-ampache query URL %c" + url,
|
|
69
69
|
"color: black; font-style: italic; background-color: orange;padding: 2px",
|
|
70
70
|
);
|
|
71
71
|
}
|
|
@@ -96,7 +96,7 @@ export abstract class Base {
|
|
|
96
96
|
|
|
97
97
|
if (this.debug) {
|
|
98
98
|
console.debug(
|
|
99
|
-
"javascript-ampache query URL %c" + url
|
|
99
|
+
"javascript-ampache query URL %c" + url,
|
|
100
100
|
"color: black; font-style: italic; background-color: orange;padding: 2px",
|
|
101
101
|
);
|
|
102
102
|
}
|
|
@@ -123,6 +123,7 @@ export abstract class Base {
|
|
|
123
123
|
* @param [params]
|
|
124
124
|
*/
|
|
125
125
|
public rawURL(endpoint: string, params?: {}) {
|
|
126
|
+
let authString = "&auth=" + this.sessionKey;
|
|
126
127
|
let query = endpoint;
|
|
127
128
|
query += qs.stringify(params, "&");
|
|
128
129
|
|
|
@@ -131,9 +132,13 @@ export abstract class Base {
|
|
|
131
132
|
"/server/json.server.php?action=" + query +
|
|
132
133
|
"&version=" + this.version;
|
|
133
134
|
|
|
135
|
+
if (!this.useBearerToken) {
|
|
136
|
+
url += authString;
|
|
137
|
+
}
|
|
138
|
+
|
|
134
139
|
if (this.debug) {
|
|
135
140
|
console.debug(
|
|
136
|
-
"javascript-ampache query URL %c" + url
|
|
141
|
+
"javascript-ampache query URL %c" + url,
|
|
137
142
|
"color: black; font-style: italic; background-color: orange;padding: 2px",
|
|
138
143
|
);
|
|
139
144
|
}
|