diff --git a/apps/course/templates/course/course_edit.html b/apps/course/templates/course/course_edit.html
index 296f8da1..83990c00 100644
--- a/apps/course/templates/course/course_edit.html
+++ b/apps/course/templates/course/course_edit.html
@@ -7,6 +7,15 @@
Создание {% if live == 'true' %}стрима{% else %}курса{% endif %}
{% endif %}
{% endblock title%}
+
+{% block header_buttons %}
+ {% if live == 'true' %}
+
+ {% else %}
+
+ {% endif %}
+{% endblock header_buttons %}
+
{% block content %}
- {% if live == 'true' %}
-
- {% else %}
-
- {% endif %}
+ {% block header_buttons %}
+ {% endblock header_buttons %}
{% include 'templates/blocks/user_menu.html' %}
diff --git a/web/src/components/CourseRedactor.vue b/web/src/components/CourseRedactor.vue
index b705382b..d2c7fddc 100644
--- a/web/src/components/CourseRedactor.vue
+++ b/web/src/components/CourseRedactor.vue
@@ -34,7 +34,8 @@
v-model="course.title"
placeholder="Добавить заголовок">
-
@@ -663,7 +664,7 @@
if(this.live) {
window.location = '/school/lessons';
} else {
- api.publishCourse(this.course.id, this.accessToken)
+ api.publishCourse(this.course, this.accessToken)
.then((response) => {
window.location = '/course/on-moderation';
})
@@ -1006,7 +1007,7 @@
},
courseFullUrl() {
let suffix = this.course.slug || this.course.id || 'ваша_ссылка';
- return `https://lil.city/course/${suffix}`;
+ return `https://lil.school/course/${suffix}`;
},
},
beforeDestroy() {
diff --git a/web/src/js/modules/api.js b/web/src/js/modules/api.js
index 929696fd..c9627aac 100644
--- a/web/src/js/modules/api.js
+++ b/web/src/js/modules/api.js
@@ -437,8 +437,9 @@ export const api = {
}
});
},
- publishCourse: (courseId, accessToken) => {
- return api.patch(`/api/v1/courses/${courseId}/`, {status: 1}, {
+ publishCourse: (course, accessToken) => {
+ course.status = 1;
+ return api.patch(`/api/v1/courses/${course.id}/`, course, {
headers: {
'Authorization': `Token ${accessToken}`,
}