fix(mobile): correct twoFactorEnabled state
This commit is contained in:
parent
4a779668e7
commit
825bc21686
|
|
@ -6,7 +6,7 @@ import type { EntryModel } from "../store/entry/types"
|
|||
import type { FeedModel } from "../store/feed/types"
|
||||
import type { ListModel } from "../store/list/store"
|
||||
import type { SubscriptionModel } from "../store/subscription/store"
|
||||
import type { UserModel } from "../store/user/store"
|
||||
import type { MeModel } from "../store/user/store"
|
||||
import type { HonoApiClient } from "./types"
|
||||
|
||||
class Morph {
|
||||
|
|
@ -202,7 +202,7 @@ class Morph {
|
|||
}
|
||||
}
|
||||
|
||||
toUser(data: HonoApiClient.User_Get, isMe?: boolean): UserModel {
|
||||
toUser(data: HonoApiClient.User_Get, isMe?: boolean): MeModel {
|
||||
return {
|
||||
id: data.id,
|
||||
name: data.name,
|
||||
|
|
@ -211,6 +211,7 @@ class Morph {
|
|||
image: data.image,
|
||||
isMe: isMe ? 1 : 0,
|
||||
emailVerified: data.emailVerified,
|
||||
twoFactorEnabled: data.twoFactorEnabled,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export type UserModel = UserSchema
|
|||
|
||||
export type MeModel = UserModel & {
|
||||
emailVerified?: boolean
|
||||
twoFactorEnabled?: boolean
|
||||
twoFactorEnabled?: boolean | null
|
||||
}
|
||||
type UserStore = {
|
||||
users: Record<string, UserModel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue