Skip to content

Commit 63b4006

Browse files
authored
chore(site): fix typegen usage (#868)
1 parent 8a1ae18 commit 63b4006

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

site/src/xServices/user/userXService.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as Types from "../../api/types"
33
import * as API from "../../api"
44

55
export interface UserContext {
6-
getUserError?: Error | unknown // unknown is a concession while I work out typing issues
6+
getUserError?: Error | unknown
77
authError?: Error | unknown
88
me?: Types.UserResponse
99
}
@@ -23,7 +23,7 @@ export const userMachine =
2323
data: Types.UserResponse
2424
}
2525
signIn: {
26-
data: Types.LoginResponse | undefined
26+
data: Types.LoginResponse
2727
}
2828
},
2929
},
@@ -110,10 +110,8 @@ export const userMachine =
110110
},
111111
{
112112
services: {
113-
signIn: async (_, event: UserEvent) => {
114-
if (event.type === "SIGN_IN") {
115-
return await API.login(event.email, event.password)
116-
}
113+
signIn: async (_, event) => {
114+
return await API.login(event.email, event.password)
117115
},
118116
signOut: API.logout,
119117
getMe: API.getUser,

0 commit comments

Comments
 (0)