Interactive/pkg/internal/server/api/publishers_api.go

16 lines
340 B
Go
Raw Normal View History

2024-08-18 16:57:20 +00:00
package api
import (
"git.solsynth.dev/hydrogen/interactive/pkg/internal/services"
"github.com/gofiber/fiber/v2"
)
func getPublisher(c *fiber.Ctx) error {
alias := c.Params("name")
if out, err := services.GetPublisher(alias); err != nil {
return fiber.NewError(fiber.StatusNotFound, err.Error())
} else {
return c.JSON(out)
}
}