Skip to content

Commit

Permalink
Refactor DoctorPaginatedResponse to use PaginatedResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
shauryag2002 committed Dec 7, 2024
1 parent 4fb718c commit 48b365c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 2 additions & 5 deletions src/Utils/request/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ import {
UserModel,
} from "@/components/Users/models";

import {
DoctorPaginatedResponse,
PaginatedResponse,
} from "@/Utils/request/types";
import { PaginatedResponse } from "@/Utils/request/types";

/**
* A fake function that returns an empty object casted to type T
Expand Down Expand Up @@ -674,7 +671,7 @@ const routes = {

listDoctor: {
path: "/api/v1/facility/{facilityId}/hospital_doctor/",
TRes: Type<DoctorPaginatedResponse<DoctorModal>>(),
TRes: Type<PaginatedResponse<DoctorModal>>(),
},
getDoctor: {
path: "/api/v1/facility/{facilityId}/hospital_doctor/{id}/",
Expand Down
4 changes: 0 additions & 4 deletions src/Utils/request/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,3 @@ export interface PaginatedResponse<TItem> {
previous: string | null;
results: TItem[];
}

export interface DoctorPaginatedResponse<T> extends PaginatedResponse<T> {
total_doctors: number;
}

0 comments on commit 48b365c

Please sign in to comment.