Cancer fix
This commit is contained in:
parent
d1b62c2407
commit
f378ab1061
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.vscode/launch.json
|
||||||
|
debug
|
3
item.go
3
item.go
@ -8,7 +8,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Item struct containing data on retrieved items
|
// Item struct containing data on retrieved items
|
||||||
@ -182,7 +181,7 @@ func (s *Session) GetModels(user string) ([]Item, error) {
|
|||||||
itm := obj.(map[string]interface{})
|
itm := obj.(map[string]interface{})
|
||||||
iInfo := itm["Item"].(map[string]interface{})
|
iInfo := itm["Item"].(map[string]interface{})
|
||||||
iCreator := itm["Creator"].(map[string]interface{})
|
iCreator := itm["Creator"].(map[string]interface{})
|
||||||
Data = append(Data, Item{"", strings.TrimRight(strings.TrimRight(fmt.Sprintf("%.2f", iInfo["AssetId"].(float64)), "0"), "."), "", strings.TrimRight(strings.TrimRight(fmt.Sprintf("%.2f", iCreator["Id"].(float64)), "0"), "."), iCreator["Name"].(string), "Model", iInfo["Name"].(string), false, true})
|
Data = append(Data, Item{"", string(int(iInfo["AssetId"].(float64))), "", string(int(iCreator["Id"].(float64))), iCreator["Name"].(string), "Model", iInfo["Name"].(string), false, true})
|
||||||
}
|
}
|
||||||
|
|
||||||
return Data, nil
|
return Data, nil
|
||||||
|
@ -98,7 +98,7 @@ func (s *Session) SendMessage(subject string, body string, recipientid int) erro
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ArchiveMessages will archieve a list of messages
|
// ArchiveMessages will archive a list of messages
|
||||||
func (s *Session) ArchiveMessages(ids []string) error {
|
func (s *Session) ArchiveMessages(ids []string) error {
|
||||||
payload := map[string][]string{
|
payload := map[string][]string{
|
||||||
"messageIds": ids,
|
"messageIds": ids,
|
||||||
|
Loading…
Reference in New Issue
Block a user