File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,14 @@ export type UserAction = {
88 type : any ;
99} ;
1010
11- export const user = ( state = { authenticated : false } , action : UserAction ) => {
11+ export const user = (
12+ state : Partial < PublicUser > & {
13+ authenticated : boolean ;
14+ } = {
15+ authenticated : false
16+ } ,
17+ action : UserAction
18+ ) => {
1219 switch ( action . type ) {
1320 case ActionTypes . AUTH_USER :
1421 return {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export interface IUser extends VirtualId, MongooseTimestamps {
2222 tokens : { kind : string } [ ] ;
2323 apiKeys : Types . DocumentArray < ApiKeyDocument > ;
2424 preferences : UserPreferences ;
25- totalSize : number ;
25+ totalSize ? : number ;
2626 cookieConsent : CookieConsentOptions ;
2727 banned : boolean ;
2828 lastLoginTimestamp ?: Date ;
@@ -44,6 +44,7 @@ export interface PublicUser
4444 | 'github'
4545 | 'google'
4646 | 'cookieConsent'
47+ | 'totalSize'
4748 > {
4849 /** Can contain either raw ApiKeyDocuments (server side) or SanitisedApiKeys (client side) */
4950 apiKeys : SanitisedApiKey [ ] ;
You can’t perform that action at this time.
0 commit comments