Skip to content

Commit

Permalink
fix list filters
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jul 24, 2024
1 parent 2c81c67 commit 7f73fbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/api/endpoints/klass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
type RetrieveArg,
type RetrieveResult,
} from "../../utils/api"
import type { Class } from "../models"
import type { Class, Teacher } from "../models"
import { type TagTypes } from "../tagTypes"
import urls from "../urls"

Expand All @@ -32,7 +32,7 @@ export type ListClassesResult = ListResult<
| "school"
| "teacher"
>
export type ListClassesArg = ListArg
export type ListClassesArg = ListArg<{ teacher: Teacher["id"] }>

export default function getReadClassEndpoints(
build: EndpointBuilder<any, any, any>,
Expand Down
4 changes: 2 additions & 2 deletions src/api/endpoints/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
type RetrieveArg,
type RetrieveResult,
} from "../../utils/api"
import type { User } from "../models"
import type { Class, User } from "../models"
import { type TagTypes } from "../tagTypes"
import urls from "../urls"

Expand Down Expand Up @@ -38,7 +38,7 @@ export type ListUsersResult = ListResult<
| "student"
| "teacher"
>
export type ListUsersArg = ListArg<{ students_in_class: string }>
export type ListUsersArg = ListArg<{ students_in_class: Class["id"] }>

export default function getReadUserEndpoints(
build: EndpointBuilder<any, any, any>,
Expand Down

0 comments on commit 7f73fbf

Please sign in to comment.