Merge pull request #35 from Since-3/bug/course-create-unique-rooms

fixed that the right course are shown for course creation
This commit is contained in:
Rajpreet0 2026-01-15 18:25:06 +01:00 • committed by GitHub
commit 9fc4496b95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ import { Button } from "@/src/components/ui/button";
import { Checkbox } from "@/src/components/ui/checkbox";
import { Label } from "@/src/components/ui/label";
import { createCourse, updateCourse } from "../../actions/course-actions";
import { getAllRooms } from "@/src/modules/rooms/actions/room-actions";
import { getMyRooms } from "@/src/modules/rooms/actions/room-actions";
import { toast } from "sonner";
import { Course } from "../../types/course.types";
@ -80,7 +80,7 @@ const CourseCreateView = ({
// Load rooms from database
useEffect(() => {
const loadRooms = async () => {
const result = await getAllRooms();
const result = await getMyRooms();
setIsLoadingRooms(true);
if (result.success) {
const roomOptions = result.rooms.map((room) => ({