Updated sdk
This commit is contained in:
parent
277d73d9fd
commit
bf7d2b907f
|
@ -1341,7 +1341,11 @@ const getToken = async (): Promise<string> => {
|
||||||
|
|
||||||
const injectAuth = async (init?: RequestInit): Promise<RequestInit> => ({
|
const injectAuth = async (init?: RequestInit): Promise<RequestInit> => ({
|
||||||
...init,
|
...init,
|
||||||
headers: { ...init?.headers, Authorization: `JWT ${await getToken()}` },
|
headers: {
|
||||||
|
...init?.headers,
|
||||||
|
Authorization: `JWT ${await getToken()}`,
|
||||||
|
"x-rate-limit-skip": import.meta.env.PAYLOAD_RATING_LIMIT_SKIP_TOKEN ?? "",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const logResponse = (res: Response) => console.log(res.status, res.statusText, res.url);
|
const logResponse = (res: Response) => console.log(res.status, res.statusText, res.url);
|
||||||
|
|
Loading…
Reference in New Issue