Skip to content

Commit

Permalink
chore(admin): to revert after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannbr committed Nov 28, 2024
1 parent 12c90e0 commit 8e68c22
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions admin/src/scenes/settings/tabs/EligibilityTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import { BiLoaderAlt } from "react-icons/bi";
import { toastr } from "react-redux-toastr";
import { capture } from "@/sentry";
import api from "@/services/api";
import { apiv2 } from "@/services/apiv2";
import { IoWarningOutline } from "react-icons/io5";
import ReactTooltip from "react-tooltip";
import ButtonLight from "@/components/ui/buttons/ButtonLight";

type EligibilityTabsProps = {
cohort?: CohortDto;
Expand Down Expand Up @@ -220,6 +222,11 @@ export default function EligibilityTab({ cohort, readOnly, getCohort }: Eligibil
</ButtonPrimary>
</div>
)}
<div className="flex items-center justify-center gap-3 ">
<ButtonLight className="h-[50px] w-[300px]" onClick={() => apiv2.get("/classe")}>
Testing apiv2
</ButtonLight>
</div>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class ClasseController {
private readonly classeService: ClasseService,
) {}

// TODO : removed after testing
// TODO : remove after testing
@Get("/")
@UseGuards(SuperAdminGuard)
findAll(): Promise<ClasseModel[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ export class ClasseRepository implements ClasseGateway {
return ClasseMapper.toModel(retrievedClasse);
}

// TODO : remove after testing
async findAll(): Promise<ClasseModel[]> {
const classes = await this.classeMongooseEntity.find();
const classes = await this.classeMongooseEntity.find({}, { academy: 1, coloration: 1, name: 1 });
return ClasseMapper.toModels(classes);
}
}

0 comments on commit 8e68c22

Please sign in to comment.