edit: response.message

This commit is contained in:
Missez 2026-02-02 09:31:22 +07:00
parent d7f824f353
commit 7de5457170
21 changed files with 227 additions and 127 deletions

View file

@ -197,6 +197,7 @@ const handleSubmit = async () => {
const response = await instructorService.createCourse(form.value);
$q.notify({
type: 'positive',
message: response.message,
@ -206,9 +207,9 @@ const handleSubmit = async () => {
// Redirect to course edit page
// Note: Assuming response.data contains the created course with ID
if (response.data && response.data.id) {
router.push(`/instructor/courses/${response.data.id}/edit`);
await navigateTo(`/instructor/courses/${response.data.id}`);
} else {
navigateTo('/instructor/courses');
await navigateTo('/instructor/courses');
}
} catch (error: any) {
$q.notify({