Team colors are uint32

This commit is contained in:
nemunaire 2016-02-26 01:29:01 +01:00 committed by Pierre-Olivier Mercier
parent e9f2b166a6
commit bd0deecc89
2 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ func bindingTeams() (string, error) {
type uploadedTeam struct {
Name string
Color int64
Color uint32
}
type uploadedMember struct {

View File

@ -7,7 +7,7 @@ import (
type Team struct {
Id int64 `json:"id"`
Name string `json:"name"`
Color int64 `json:"color"`
Color uint32 `json:"color"`
}
func GetTeams() ([]Team, error) {
@ -41,7 +41,7 @@ func GetTeam(id int) (Team, error) {
return t, nil
}
func CreateTeam(name string, color int64) (Team, error) {
func CreateTeam(name string, color uint32) (Team, error) {
if res, err := DBExec("INSERT INTO teams (name, color) VALUES (?, ?)", name, color); err != nil {
return Team{}, err
} else if tid, err := res.LastInsertId(); err != nil {