fix: id-s
This commit is contained in:
parent
9f162e5363
commit
21d14fef3c
1 changed files with 2 additions and 2 deletions
|
@ -3,9 +3,9 @@ package Post
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
guuid "github.com/google/uuid"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/interop/native/std"
|
"github.com/nspcc-dev/neo-go/pkg/interop/native/std"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/interop/storage"
|
"github.com/nspcc-dev/neo-go/pkg/interop/storage"
|
||||||
"github.com/rs/xid"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Post struct {
|
type Post struct {
|
||||||
|
@ -40,7 +40,7 @@ func NewPost(authorId string, text string, postName string) {
|
||||||
likes: 0,
|
likes: 0,
|
||||||
category: "none",
|
category: "none",
|
||||||
postName: postName,
|
postName: postName,
|
||||||
id: xid.New().String(),
|
id: guuid.New().String(),
|
||||||
}
|
}
|
||||||
storage.Put(ctx, post.id, std.Serialize(post))
|
storage.Put(ctx, post.id, std.Serialize(post))
|
||||||
updatePostIndex(authorId)
|
updatePostIndex(authorId)
|
||||||
|
|
Loading…
Reference in a new issue