edit: response.message
This commit is contained in:
parent
d7f824f353
commit
7de5457170
21 changed files with 227 additions and 127 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue