From 66008d92a182058d574d48b65e7e4908d7f2563b Mon Sep 17 00:00:00 2001 From: elraphty Date: Tue, 7 May 2024 14:51:56 +0100 Subject: [PATCH] fixeed payment history --- db/structs.go | 32 ++++++++++++++++---------------- handlers/workspaces.go | 10 +++++----- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/db/structs.go b/db/structs.go index 8cefb2bbf..ddae676fc 100644 --- a/db/structs.go +++ b/db/structs.go @@ -552,17 +552,17 @@ type WorkspaceUsersData struct { } type WorkspaceFeatures struct { - ID uint `json:"id"` - Uuid string `json:"uuid"` - WorkspaceUuid string `json:"workspace_uuid"` - Name string `json:"name"` - Brief string `json:"brief"` - Requirements string `json:"requirements"` - Architecture string `json:"architecture"` - Created *time.Time `json:"created"` - Updated *time.Time `json:"updated"` - CreatedBy string `json:"created_by"` - UpdatedBy string `json:"updated_by"` + ID uint `json:"id"` + Uuid string `json:"uuid"` + WorkspaceUuid string `json:"workspace_uuid"` + Name string `json:"name"` + Brief string `json:"brief"` + Requirements string `json:"requirements"` + Architecture string `json:"architecture"` + Created *time.Time `json:"created"` + Updated *time.Time `json:"updated"` + CreatedBy string `json:"created_by"` + UpdatedBy string `json:"updated_by"` } type BountyRoles struct { @@ -689,11 +689,11 @@ type NewPaymentHistory struct { } type PaymentHistoryData struct { - PaymentHistory NewPaymentHistory - SenderName string `json:"sender_name"` - ReceiverName string `json:"receiver_name"` - SenderImg string `json:"sender_img"` - ReceiverImg string `json:"receiver_img"` + NewPaymentHistory + SenderName string `json:"sender_name"` + ReceiverName string `json:"receiver_name"` + SenderImg string `json:"sender_img"` + ReceiverImg string `json:"receiver_img"` } type PaymentData struct { diff --git a/handlers/workspaces.go b/handlers/workspaces.go index 0b152c96d..bcd365154 100644 --- a/handlers/workspaces.go +++ b/handlers/workspaces.go @@ -640,11 +640,11 @@ func GetPaymentHistory(w http.ResponseWriter, r *http.Request) { sender := db.DB.GetPersonByPubkey(payment.SenderPubKey) receiver := db.DB.GetPersonByPubkey(payment.ReceiverPubKey) paymentData := db.PaymentHistoryData{ - PaymentHistory: payment, - SenderName: sender.UniqueName, - SenderImg: sender.Img, - ReceiverName: receiver.UniqueName, - ReceiverImg: receiver.Img, + NewPaymentHistory: payment, + SenderName: sender.UniqueName, + SenderImg: sender.Img, + ReceiverName: receiver.UniqueName, + ReceiverImg: receiver.Img, } paymentHistoryData = append(paymentHistoryData, paymentData) }