Interactive/pkg/internal/server/api/publishers_api.go
2024-08-19 00:57:20 +08:00

16 lines
340 B
Go

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)
}
}