Skip to content

Commit

Permalink
add sections fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mono424 committed Sep 15, 2023
1 parent 44d2031 commit 2ebd58a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions api/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions web/ts/api/admin-lecture-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,12 @@ export const AdminLectureList = {
* @param lectureId
* @param sections
*/
addSections: async (lectureId: number, sections: VideoSection[]): Promise<void> => {
await post(`/api/stream/${lectureId}/sections`, sections.map((s) => ({
addSections: async (lectureId: number, sections: VideoSection[]): Promise<VideoSection[]> => {
const result = await post(`/api/stream/${lectureId}/sections`, sections.map((s) => ({
...s,
streamID: lectureId,
})));
return result.json();
},

/**
Expand Down

0 comments on commit 2ebd58a

Please sign in to comment.