Skip to content

Commit 4ffa873

Browse files
committed
useAllの型修正
1 parent ac77c4e commit 4ffa873

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/api/user.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type { Hook as UseHook } from "./share/types.ts";
1919

2020
const UserListSchema = z.array(UserWithCoursesAndSubjectsSchema);
2121

22-
export function useAll(): Hook<User[]> {
22+
export function useAll(): Hook<UserWithCoursesAndSubjects[]> {
2323
return useCustomizedSWR("users::all", all, UserListSchema);
2424
}
2525
export function useRecommended(): UseHook<UserWithCoursesAndSubjects[]> {
@@ -40,7 +40,7 @@ export function usePendingFromMe(): Hook<UserWithCoursesAndSubjects[]> {
4040
);
4141
}
4242

43-
async function all(): Promise<User[]> {
43+
async function all(): Promise<UserWithCoursesAndSubjects[]> {
4444
const res = await credFetch("GET", endpoints.users);
4545
return res.json();
4646
}

0 commit comments

Comments
 (0)