added backend and 2 endpoints fetch
This commit is contained in:
1 parent
7c6db3dfbd
commit
ca99cfcf6d
56 files changed
+344
-29
No files matched your search
@@ -0,0 +1,33 @@
|
||||
package category
|
||||
|
||||
import "backend/model"
|
||||
|
||||
func GetAllCategories() ([]model.Category, error) {
|
||||
return []model.Category{
|
||||
{
|
||||
ID: "1",
|
||||
Title: "Electronics",
|
||||
Icon: "😀",
|
||||
},
|
||||
{
|
||||
ID: "2",
|
||||
Title: "Clothing",
|
||||
Icon: "😁",
|
||||
},
|
||||
{
|
||||
ID: "3",
|
||||
Title: "Books",
|
||||
Icon: "😂",
|
||||
Subcategories: []model.Subcategory{
|
||||
{
|
||||
ID: "1",
|
||||
Title: "Fiction",
|
||||
},
|
||||
{
|
||||
ID: "2",
|
||||
Title: "Non-Fiction",
|
||||
},
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
Reference in new issue
Block a user