fix handleResponse issue
This commit is contained in:
@@ -18,9 +18,11 @@ export default class ApplicationAdapter extends JSONAPIAdapter {
|
|||||||
return headers;
|
return headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleResponse(status) {
|
handleResponse(status, headers, payload, requestData) {
|
||||||
if (status === 401 && this.session.isAuthenticated) {
|
if (status === 401 && this.session.isAuthenticated) {
|
||||||
this.session.invalidate();
|
this.session.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return super.handleResponse(status, headers, payload, requestData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
app/serializers/application.js
Normal file
3
app/serializers/application.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import JSONAPISerializer from '@ember-data/serializer/json-api';
|
||||||
|
|
||||||
|
export default class ApplicationSerializer extends JSONAPISerializer {}
|
||||||
Reference in New Issue
Block a user