mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Rename access token param to be shorter (#40)
This commit is contained in:
@@ -30,7 +30,7 @@ import _, { shuffle } from "underscore";
|
|||||||
import morgan from "morgan";
|
import morgan from "morgan";
|
||||||
import { takeWithRepeats } from "./utils";
|
import { takeWithRepeats } from "./utils";
|
||||||
|
|
||||||
export const BONOB_ACCESS_TOKEN_HEADER = "bonob-access-token";
|
export const BONOB_ACCESS_TOKEN_HEADER = "bat";
|
||||||
|
|
||||||
interface RangeFilter extends Transform {
|
interface RangeFilter extends Transform {
|
||||||
range: (length: number) => string;
|
range: (length: number) => string;
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ function bindSmapiSoapServiceToExpress(
|
|||||||
const urlWithToken = (accessToken: string) =>
|
const urlWithToken = (accessToken: string) =>
|
||||||
bonobUrl.append({
|
bonobUrl.append({
|
||||||
searchParams: {
|
searchParams: {
|
||||||
"bonob-access-token": accessToken,
|
"bat": accessToken,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -448,7 +448,7 @@ describe("api", () => {
|
|||||||
const accessToken = `accessToken-${uuid()}`;
|
const accessToken = `accessToken-${uuid()}`;
|
||||||
|
|
||||||
const bonobUrlWithAccessToken = bonobUrl.append({
|
const bonobUrlWithAccessToken = bonobUrl.append({
|
||||||
searchParams: { "bonob-access-token": accessToken },
|
searchParams: { "bat": accessToken },
|
||||||
});
|
});
|
||||||
|
|
||||||
const service = bonobService("test-api", 133, bonobUrl, "AppLink");
|
const service = bonobService("test-api", 133, bonobUrl, "AppLink");
|
||||||
@@ -2428,7 +2428,7 @@ describe("api", () => {
|
|||||||
})
|
})
|
||||||
.href(),
|
.href(),
|
||||||
httpHeaders: {
|
httpHeaders: {
|
||||||
header: "bonob-access-token",
|
header: "bat",
|
||||||
value: accessToken,
|
value: accessToken,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -2510,7 +2510,7 @@ describe("api", () => {
|
|||||||
expect(root[0]).toEqual({
|
expect(root[0]).toEqual({
|
||||||
getMediaMetadataResult: track(
|
getMediaMetadataResult: track(
|
||||||
bonobUrl.with({
|
bonobUrl.with({
|
||||||
searchParams: { "bonob-access-token": accessToken },
|
searchParams: { "bat": accessToken },
|
||||||
}),
|
}),
|
||||||
someTrack
|
someTrack
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user