forked from newbee-ltd/newbee-mall-api-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmall_user_address.go
24 lines (20 loc) · 1.02 KB
/
mall_user_address.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package mall
import (
"github.com/gin-gonic/gin"
v1 "main.go/api/v1"
"main.go/middleware"
)
type MallUserAddressRouter struct {
}
func (m *MallUserRouter) InitMallUserAddressRouter(Router *gin.RouterGroup) {
mallUserAddressRouter := Router.Group("v1").Use(middleware.UserJWTAuth())
var mallUserAddressApi = v1.ApiGroupApp.MallApiGroup.MallUserAddressApi
{
mallUserAddressRouter.GET("/address", mallUserAddressApi.AddressList) //用户地址
mallUserAddressRouter.POST("/address", mallUserAddressApi.SaveUserAddress) //添加地址
mallUserAddressRouter.PUT("/address", mallUserAddressApi.UpdateMallUserAddress) //修改用户地址
mallUserAddressRouter.GET("/address/:addressId", mallUserAddressApi.GetMallUserAddress) //获取地址详情
mallUserAddressRouter.GET("/address/default", mallUserAddressApi.GetMallUserDefaultAddress) //获取默认地址
mallUserAddressRouter.DELETE("/address/:addressId", mallUserAddressApi.DeleteUserAddress) //删除地址
}
}