Changed get verb for list in Plans methods
This commit is contained in:
parent
efd337b6ce
commit
49a8fe3814
2 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ func listPlans(c *gin.Context) {
|
||||||
if u == nil {
|
if u == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
plans, err := u.GetPlans(db)
|
plans, err := u.ListPlans(db)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
c.JSON(http.StatusOK, plans)
|
c.JSON(http.StatusOK, plans)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (u *User) GetPlans(orm *gorm.DB) ([]Plan, error) {
|
func (u *User) ListPlans(orm *gorm.DB) ([]Plan, error) {
|
||||||
var plans []Plan
|
var plans []Plan
|
||||||
err := orm.Debug().Table("plans p").
|
err := orm.Debug().Table("plans p").
|
||||||
Select("p.*").
|
Select("p.*").
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue