Cancer fix

This commit is contained in:
itzaname 2017-01-07 03:16:02 -05:00
parent d1b62c2407
commit f378ab1061
3 changed files with 4 additions and 3 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.vscode/launch.json
debug

View File

@ -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

View File

@ -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,