tsk-14: Record when message was sent (#16)
Closes #14 Reviewed-on: #16 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -19,15 +19,15 @@ type Message struct {
|
||||
}
|
||||
|
||||
type getMessageResponse struct {
|
||||
Message string `json:"message"`
|
||||
Data []*message.Message `json:"data"`
|
||||
Message string `json:"message"`
|
||||
Data []*message.Message `json:"data"`
|
||||
}
|
||||
|
||||
func (m *Message) GetMessage(id uuid.UUID) (*message.Message, error) {
|
||||
params := url.Values{}
|
||||
params.Add("id", id.String())
|
||||
pm := params.Encode()
|
||||
fullUrl := fmt.Sprintf("%s/api/v1/message?%s", m.Application.ApiUrl, pm)
|
||||
fullUrl := fmt.Sprintf("%s/api/v1/message?%s", m.Application.ApiUrl, pm)
|
||||
fmt.Println("Url:", fullUrl)
|
||||
req, err := http.NewRequest("GET", fullUrl, nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user