23 lines
447 B
Go
Raw Permalink Normal View History

2025-01-25 18:33:11 +08:00
package api
import (
"github.com/gofiber/fiber/v2"
)
func MapAPIs(app *fiber.App, baseURL string) {
api := app.Group(baseURL).Name("API")
{
2025-01-29 14:01:34 +08:00
wallet := api.Group("/wallets").Name("Wallet API")
2025-01-25 18:33:11 +08:00
{
wallet.Post("/me", createWallet)
2025-01-25 18:33:11 +08:00
wallet.Get("/me", getMyWallet)
}
2025-01-29 14:01:34 +08:00
transaction := api.Group("/transactions").Name("Transaction API")
2025-01-25 18:33:11 +08:00
{
transaction.Get("/me", getTransaction)
transaction.Get("/:id", getTransactionByID)
2025-01-25 18:33:11 +08:00
}
}
}