Merge branch 'fix/login-struct-change' into 'release'
Updating login structure as per backend See merge request theappsmith/internal-tools-client!351
This commit is contained in:
commit
02a01c700a
|
|
@ -6,5 +6,5 @@ export type User = {
|
|||
};
|
||||
|
||||
export const CurrentUserDetailsRequestPayload = {
|
||||
id: "me",
|
||||
id: "profile",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -265,11 +265,17 @@ export function* fetchUserSaga(action: ReduxAction<FetchUserRequest>) {
|
|||
try {
|
||||
const request: FetchUserRequest = action.payload;
|
||||
const response: FetchUserResponse = yield call(UserApi.fetchUser, request);
|
||||
const { user, applications, currentOrganization } = response.data;
|
||||
const finalData = {
|
||||
...user,
|
||||
applications,
|
||||
currentOrganization,
|
||||
};
|
||||
const isValidResponse = yield validateResponse(response);
|
||||
if (isValidResponse) {
|
||||
yield put({
|
||||
type: ReduxActionTypes.FETCH_USER_SUCCESS,
|
||||
payload: response.data,
|
||||
payload: finalData,
|
||||
});
|
||||
return yield response.data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user