🐛 Bug fixes on uri conflict
This commit is contained in:
parent
d66b591f92
commit
1603d9f438
@ -37,7 +37,7 @@ func getChannelAvailability(c *fiber.Ctx) error {
|
||||
channel, _, err = services.GetAvailableChannelWithAlias(alias, user)
|
||||
}
|
||||
if err != nil {
|
||||
return fiber.NewError(fiber.StatusForbidden, err.Error())
|
||||
return c.Status(fiber.StatusForbidden).JSON(channel)
|
||||
}
|
||||
|
||||
return c.JSON(channel)
|
||||
|
@ -79,7 +79,7 @@ func NewServer() {
|
||||
{
|
||||
channels.Get("/", listChannel)
|
||||
channels.Get("/:channel", getChannel)
|
||||
channels.Get("/:channel/available", authMiddleware, getChannelAvailability)
|
||||
channels.Get("/:channel/availability", authMiddleware, getChannelAvailability)
|
||||
channels.Get("/me", authMiddleware, listOwnedChannel)
|
||||
channels.Get("/me/available", authMiddleware, listAvailableChannel)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user