fix: make admin media uploads reliable

This commit is contained in:
Server Migration
2026-08-16 17:03:36 +03:30
parent b64f528c0d
commit 861773b05b
9 changed files with 119 additions and 28 deletions
+2 -1
View File
@@ -2,7 +2,8 @@ import { array, boolean, mixed, number, object, string } from 'yup'
export const courseSchema = object().shape({
title: string().required().min(3).max(255),
teacherId: mixed().required(),
// The backend intentionally allows courses without an assigned teacher.
teacherId: mixed().nullable().notRequired(),
capacity: number()
.typeError('ظرفیت باید به‌صورت عدد وارد شود')
.required()