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")
|
|
|
|
{
|
|
|
|
wallet := api.Group("/wallet").Name("Wallet API")
|
|
|
|
{
|
2025-01-26 17:48:35 +08:00
|
|
|
wallet.Post("/me", createWallet)
|
2025-01-25 18:33:11 +08:00
|
|
|
wallet.Get("/me", getMyWallet)
|
|
|
|
}
|
|
|
|
|
|
|
|
transaction := api.Group("/transaction").Name("Transaction API")
|
|
|
|
{
|
|
|
|
transaction.Get("/me", getTransaction)
|
2025-01-26 17:48:35 +08:00
|
|
|
transaction.Get("/:id", getTransactionByID)
|
2025-01-25 18:33:11 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|