Skip to content
Snippets Groups Projects
Commit 6ec919c3 authored by Hosea Nathanael Abetnego's avatar Hosea Nathanael Abetnego
Browse files

fix: incorrect topik table to fetch data from

parent db0cf3d2
Pipeline #65998 failed with stages
in 2 minutes and 23 seconds
...@@ -9,6 +9,10 @@ type Topik struct { ...@@ -9,6 +9,10 @@ type Topik struct {
Pengguna Pengguna `gorm:"foreignKey:PengajuID"` Pengguna Pengguna `gorm:"foreignKey:PengajuID"`
} }
func (Topik) TableName() string {
return "topik"
}
type Pengguna struct { type Pengguna struct {
ID string `gorm:"type:uuid;primaryKey" json:"id"` ID string `gorm:"type:uuid;primaryKey" json:"id"`
Nama string `json:"nama"` Nama string `json:"nama"`
...@@ -16,6 +20,10 @@ type Pengguna struct { ...@@ -16,6 +20,10 @@ type Pengguna struct {
Roles string `json:"roles"` Roles string `json:"roles"`
} }
func (Pengguna) TableName() string {
return "pengguna"
}
type GetAllReturnType struct { type GetAllReturnType struct {
DaftarTopikData []Topik `json:"data"` DaftarTopikData []Topik `json:"data"`
MaxPage int `json:"maxPage"` MaxPage int `json:"maxPage"`
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment