-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add lastLoginAt to user (#1185)
* add lastLoginAt to user * fix lint and fixture issues * Add test for user not found * Update test to evaluate the correct user --------- Co-authored-by: Jacob Capps <[email protected]> Co-authored-by: Jacob Capps <[email protected]>
- Loading branch information
1 parent
265731b
commit c54ad4a
Showing
5 changed files
with
166 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { ObjectId } from 'bson' | ||
import { DateTime } from 'luxon' | ||
import type { SessionUser, PortalUser, Collection, Widget } from 'types' | ||
|
||
const mockNews: Widget = { | ||
|
@@ -111,6 +112,7 @@ export const testPortalUser1: PortalUser = { | |
], | ||
displayName: 'BERNADETTE CAMPBELL', | ||
theme: 'light', | ||
lastLoginAt: DateTime.now().toISO()!, | ||
} | ||
|
||
export const portalUserMaxedOutCollection: PortalUser = { | ||
|
@@ -156,6 +158,7 @@ export const portalUserMaxedOutCollection: PortalUser = { | |
], | ||
displayName: 'BERNADETTE CAMPBELL', | ||
theme: 'light', | ||
lastLoginAt: DateTime.now().toISO()!, | ||
} | ||
|
||
export const portalUserWithExampleCollection: PortalUser = { | ||
|
@@ -194,6 +197,7 @@ export const portalUserWithExampleCollection: PortalUser = { | |
], | ||
displayName: 'BERNADETTE CAMPBELL', | ||
theme: 'light', | ||
lastLoginAt: DateTime.now().toISO()!, | ||
} | ||
|
||
const mockCollectionWithGuardianIdeal: Widget = { | ||
|
@@ -207,6 +211,7 @@ export const portalUserGuardianIdeal: PortalUser = { | |
mySpace: [mockCollectionWithGuardianIdeal], | ||
displayName: 'BERNADETTE CAMPBELL', | ||
theme: 'dark', | ||
lastLoginAt: DateTime.now().toISO()!, | ||
} | ||
|
||
const mockCollectionWithFeaturedShortcuts: Widget = { | ||
|
@@ -220,6 +225,7 @@ export const portalUserFeaturedShortcuts: PortalUser = { | |
mySpace: [mockCollectionWithFeaturedShortcuts], | ||
displayName: 'BERNADETTE CAMPBELL', | ||
theme: 'dark', | ||
lastLoginAt: DateTime.now().toISO()!, | ||
} | ||
|
||
const mockCollection: Collection = { | ||
|
@@ -260,13 +266,15 @@ export const portalUserCollectionLimit: PortalUser = { | |
mySpace: maxCollections, | ||
displayName: 'BERNADETTE CAMPBELL', | ||
theme: 'light', | ||
lastLoginAt: DateTime.now().toISO()!, | ||
} | ||
|
||
export const portalUserAlmostAtCollectionLimit: PortalUser = { | ||
userId: '[email protected]', | ||
mySpace: almostMaxCollections, | ||
displayName: 'BERNADETTE CAMPBELL', | ||
theme: 'light', | ||
lastLoginAt: DateTime.now().toISO()!, | ||
} | ||
|
||
export const portalUserCollectionLimitWithAllAdditionalWidgets: PortalUser = { | ||
|
@@ -279,6 +287,7 @@ export const portalUserCollectionLimitWithAllAdditionalWidgets: PortalUser = { | |
], | ||
displayName: 'BERNADETTE CAMPBELL', | ||
theme: 'light', | ||
lastLoginAt: DateTime.now().toISO()!, | ||
} | ||
|
||
export const portalUserNoCollections: PortalUser = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters