@djangocfg/api 2.1.345 → 2.1.347
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/auth-server.cjs +6 -0
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +6 -0
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +20 -3
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +14 -1
- package/dist/auth.d.ts +14 -1
- package/dist/auth.mjs +20 -3
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.mjs.map +1 -1
- package/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/helpers/auth.ts +6 -0
- package/src/_api/generated/index.ts +7 -0
- package/src/auth/constants.ts +13 -0
- package/src/auth/hooks/useAuthForm.ts +3 -2
- package/src/auth/hooks/useAutoAuth.ts +2 -1
- package/src/auth/index.ts +3 -0
package/dist/auth-server.mjs
CHANGED
|
@@ -255,6 +255,12 @@ function installAuthOnClient(client2) {
|
|
|
255
255
|
if (locale) request.headers.set("Accept-Language", locale);
|
|
256
256
|
const apiKey = auth.getApiKey();
|
|
257
257
|
if (apiKey) request.headers.set("X-API-Key", apiKey);
|
|
258
|
+
try {
|
|
259
|
+
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
260
|
+
if (tz) request.headers.set("X-Timezone", tz);
|
|
261
|
+
} catch {
|
|
262
|
+
}
|
|
263
|
+
request.headers.set("X-Client-Time", (/* @__PURE__ */ new Date()).toISOString());
|
|
258
264
|
return request;
|
|
259
265
|
});
|
|
260
266
|
client2.interceptors.response.use(async (response, request) => {
|