Skip to content

Commit 589a64e

Browse files
committed
fix(auth_service): update user creation logic
- Replace FeedActionType with FeedDecoratorType - Update UserFeedActionStatus to UserFeedDecoratorStatus - Replace language code 'en' with Language object
1 parent 31eef33 commit 589a64e

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

lib/src/services/auth_service.dart

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,11 @@ class AuthService {
287287
appRole: AppUserRole.standardUser,
288288
dashboardRole: DashboardUserRole.none,
289289
createdAt: DateTime.now(),
290-
feedActionStatus: Map.fromEntries(
291-
FeedActionType.values.map(
290+
feedDecoratorStatus: Map.fromEntries(
291+
FeedDecoratorType.values.map(
292292
(type) => MapEntry(
293293
type,
294-
const UserFeedActionStatus(isCompleted: false),
294+
const UserFeedDecoratorStatus(isCompleted: false),
295295
),
296296
),
297297
),
@@ -347,10 +347,10 @@ class AuthService {
347347
appRole: AppUserRole.guestUser,
348348
dashboardRole: DashboardUserRole.none,
349349
createdAt: DateTime.now(),
350-
feedActionStatus: Map.fromEntries(
351-
FeedActionType.values.map(
350+
feedDecoratorStatus: Map.fromEntries(
351+
FeedDecoratorType.values.map(
352352
(type) =>
353-
MapEntry(type, const UserFeedActionStatus(isCompleted: false)),
353+
MapEntry(type, const UserFeedDecoratorStatus(isCompleted: false)),
354354
),
355355
),
356356
);
@@ -527,7 +527,15 @@ class AuthService {
527527
textScaleFactor: AppTextScaleFactor.medium,
528528
fontWeight: AppFontWeight.regular,
529529
),
530-
language: 'en',
530+
language: Language(
531+
id: '6633b7ac1892f06e6914d0b3',
532+
code: 'en',
533+
name: 'English',
534+
nativeName: 'English',
535+
createdAt: DateTime.now(),
536+
updatedAt: DateTime.now(),
537+
status: ContentStatus.active,
538+
),
531539
feedPreferences: const FeedDisplayPreferences(
532540
headlineDensity: HeadlineDensity.standard,
533541
headlineImageStyle: HeadlineImageStyle.smallThumbnail,

0 commit comments

Comments
 (0)