From 945d88839ff38cfba1fc3a28da0d6a8f5b472cd6 Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Mon, 8 May 2023 09:12:37 +0200 Subject: [PATCH] AW-5036 404../api/v1/items/xxx:USER_SETTINGS (new environ) --- projects/common/src/fm/actions/app-common.actions.ts | 2 +- projects/common/src/fm/effects/app-common.effects.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/common/src/fm/actions/app-common.actions.ts b/projects/common/src/fm/actions/app-common.actions.ts index 82006f9..2c21045 100644 --- a/projects/common/src/fm/actions/app-common.actions.ts +++ b/projects/common/src/fm/actions/app-common.actions.ts @@ -126,7 +126,7 @@ export class InitUserSettingsRoot implements Action { export class InitUserSettingsRootSuccess implements Action { readonly type = INITUSERSETTINGSROOTSUCCESS; - constructor(public item: IItem ) { } + constructor(public item: IListItem ) { } } export class InitRoot implements Action { diff --git a/projects/common/src/fm/effects/app-common.effects.ts b/projects/common/src/fm/effects/app-common.effects.ts index 20f8923..36e91ef 100644 --- a/projects/common/src/fm/effects/app-common.effects.ts +++ b/projects/common/src/fm/effects/app-common.effects.ts @@ -85,9 +85,8 @@ export class AppCommonEffects { initUserSettingsRoot$ = createEffect(() => this.actions$.pipe( ofType(appCommonActions.INITUSERSETTINGSROOT), - withLatestFrom(this.store$.select(appCommonReducers.SelectGetUser)), - switchMap(([, user]) => { - return this.itemService$.getItem(user.code + ':USER_SETTINGS').pipe( + switchMap(_ => { + return this.folderService$.getFolder('my_settings').pipe( switchMap((item) => of(new appCommonActions.InitUserSettingsRootSuccess(item))), catchError(error => of(new appCommonActions.Fail(error))) )