aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-04-26 15:16:47 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-04-26 15:16:47 +0530
commite2c31632d326f5f201172dba08b06b422abfa593 (patch)
treebbaaa2b9bc37cdb0acbc9a24603a7fb39918e657 /server
parent1604f4cabc282e91fe27aef74545084ab92e4b9f (diff)
FINALLY THE BACKEND AND FRONT END ARE TALKING NOW
Diffstat (limited to 'server')
-rw-r--r--server/main.go28
1 files changed, 27 insertions, 1 deletions
diff --git a/server/main.go b/server/main.go
index 4f984da..2a02269 100644
--- a/server/main.go
+++ b/server/main.go
@@ -31,14 +31,40 @@ func main() {
}
func getAllItems(ctx *gin.Context) {
- allItems := [1]Item{
+ allItems := [6]Item{
{
"Kisan Chair",
"Very Good Chair",
100,
9403,
+ }, {
+ "Supreme Chair",
+ "Even Better Chair",
+ 200,
+ 9403,
+ }, {
+ "Action Houseware",
+ "Not a chair",
+ 50,
+ 69,
+ }, {
+ "Coirfit Mattress",
+ "I wanna sleep",
+ 900,
+ 420,
+ }, {
+ "AVRO Chair",
+ "Formerly AVON lol",
+ 150,
+ 9403,
+ }, {
+ "Mystery Item",
+ "hehe hehehehe",
+ 1000,
+ 177013,
},
}
+ ctx.Header("Content-Type", "application/json")
ctx.JSON(http.StatusOK, allItems)
}