fix types convert
This commit is contained in:
parent
e819d8ce2c
commit
dc9f6a73aa
1 changed files with 2 additions and 4 deletions
|
@ -1,8 +1,6 @@
|
|||
package Post
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/native/oracle"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/native/std"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
||||
|
@ -56,7 +54,7 @@ func CbGetUUID(url string, postData any, code int, result []byte) {
|
|||
panic("not called from the oracle contract")
|
||||
}
|
||||
if code != oracle.Success {
|
||||
panic("request failed for " + url + " with code " + std.Itoa(code, 10))
|
||||
panic("request failed for " + url + " with code " + std.Itoa10(code))
|
||||
}
|
||||
runtime.Log("result for " + url + " is: " + string(result))
|
||||
|
||||
|
@ -94,7 +92,7 @@ func GetAllPostsByUser(userId string) []Post {
|
|||
i := 0
|
||||
n := getPostIndex(userId)
|
||||
for i < n {
|
||||
post := storage.Get(ctx, userId+strconv.Itoa(i))
|
||||
post := storage.Get(ctx, userId+std.Itoa10(i))
|
||||
i++
|
||||
postsByUser = append(postsByUser, std.Deserialize(post.([]byte)).(Post))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue