mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-08 12:47:46 +02:00
fix:#7 fixed main changes
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
// add routes to the app instance for the data-manager ical service
|
// AddFeedRoutes add routes to the app instance for the data-manager ical service
|
||||||
// with golang fiber
|
// with golang fiber
|
||||||
func AddFeedRoutes(app *fiber.App) {
|
func AddFeedRoutes(app *fiber.App) {
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ func AddFeedRoutes(app *fiber.App) {
|
|||||||
|
|
||||||
// Define a route for the POST method on the root path '/api/feed'
|
// Define a route for the POST method on the root path '/api/feed'
|
||||||
app.Post("/api/feed", func(c fiber.Ctx) error {
|
app.Post("/api/feed", func(c fiber.Ctx) error {
|
||||||
modules := []model.FeedCollection{}
|
var modules []model.FeedCollection
|
||||||
//obtain the body of the request
|
//obtain the body of the request
|
||||||
err := json.Unmarshal(c.Body(), &modules)
|
err := json.Unmarshal(c.Body(), &modules)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user