diff --git a/api/stream.go b/api/stream.go index b50174cad..82b83bb0a 100644 --- a/api/stream.go +++ b/api/stream.go @@ -12,13 +12,13 @@ import ( "strings" "time" - "github.com/getsentry/sentry-go" - "github.com/gin-gonic/gin" "github.com/TUM-Dev/gocast/dao" "github.com/TUM-Dev/gocast/model" "github.com/TUM-Dev/gocast/tools" "github.com/TUM-Dev/gocast/tools/bot" "github.com/TUM-Dev/gocast/voice-service/pb" + "github.com/getsentry/sentry-go" + "github.com/gin-gonic/gin" uuid "github.com/satori/go.uuid" log "github.com/sirupsen/logrus" "gorm.io/gorm" @@ -496,6 +496,8 @@ func (r streamRoutes) createVideoSectionBatch(c *gin.Context) { log.WithError(err).Error("failed to generate video section images") } }() + + c.JSON(http.StatusOK, sections) } type UpdateVideoSectionRequest struct { diff --git a/web/ts/api/admin-lecture-list.ts b/web/ts/api/admin-lecture-list.ts index a491038b1..acedbde13 100644 --- a/web/ts/api/admin-lecture-list.ts +++ b/web/ts/api/admin-lecture-list.ts @@ -278,11 +278,12 @@ export const AdminLectureList = { * @param lectureId * @param sections */ - addSections: async (lectureId: number, sections: VideoSection[]): Promise => { - await post(`/api/stream/${lectureId}/sections`, sections.map((s) => ({ + addSections: async (lectureId: number, sections: VideoSection[]): Promise => { + const result = await post(`/api/stream/${lectureId}/sections`, sections.map((s) => ({ ...s, streamID: lectureId, }))); + return result.json(); }, /**