quasar-ui-danx 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +4 -3
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +2 -2
- package/dist/danx.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/request.ts +3 -2
- package/src/types/requests.d.ts +1 -1
package/package.json
CHANGED
package/src/helpers/request.ts
CHANGED
@@ -55,9 +55,10 @@ export const request: RequestApi = {
|
|
55
55
|
|
56
56
|
if (response.status === 401) {
|
57
57
|
const onUnauthorized = danxOptions.value.request?.onUnauthorized;
|
58
|
-
return onUnauthorized ? onUnauthorized(response) : {
|
58
|
+
return onUnauthorized ? onUnauthorized(result, response) : {
|
59
59
|
error: true,
|
60
|
-
message: "Unauthorized"
|
60
|
+
message: "Unauthorized",
|
61
|
+
...result
|
61
62
|
};
|
62
63
|
}
|
63
64
|
|
package/src/types/requests.d.ts
CHANGED
@@ -23,7 +23,7 @@ export interface HttpResponse {
|
|
23
23
|
export interface RequestOptions {
|
24
24
|
baseUrl?: string;
|
25
25
|
headers?: AnyObject;
|
26
|
-
onUnauthorized?: (response) => object;
|
26
|
+
onUnauthorized?: (result: any, response: Response) => object;
|
27
27
|
onAppVersionMismatch?: (version) => void;
|
28
28
|
}
|
29
29
|
|