Adjust Mojang's queue behavior

This commit is contained in:
ErickSkrauch
2019-05-06 17:12:37 +03:00
parent 9dde5715f5
commit 1f057a27aa
6 changed files with 92 additions and 84 deletions

View File

@@ -4,7 +4,7 @@ import "github.com/elyby/chrly/api/mojang"
type UuidsStorage interface {
GetUuid(username string) (string, error)
StoreUuid(username string, uuid string)
StoreUuid(username string, uuid string) error
}
// nil value can be passed to the storage to indicate that there is no textures
@@ -31,8 +31,8 @@ func (s *SplittedStorage) GetUuid(username string) (string, error) {
return s.UuidsStorage.GetUuid(username)
}
func (s *SplittedStorage) StoreUuid(username string, uuid string) {
s.UuidsStorage.StoreUuid(username, uuid)
func (s *SplittedStorage) StoreUuid(username string, uuid string) error {
return s.UuidsStorage.StoreUuid(username, uuid)
}
func (s *SplittedStorage) GetTextures(uuid string) (*mojang.SignedTexturesResponse, error) {