18 lines
324 B
Go
18 lines
324 B
Go
package api
|
|
|
|
import (
|
|
"backend/internal/operation"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func GetAllOperation(c *fiber.Ctx) error {
|
|
operations, err := operation.GetAllOperation()
|
|
if err != nil {
|
|
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{
|
|
"error": err.Error(),
|
|
})
|
|
}
|
|
return c.JSON(operations)
|
|
}
|