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 (
|
||||
"strconv"
|
||||
|
||||
guuid "github.com/google/uuid"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/native/std"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/storage"
|
||||
"github.com/rs/xid"
|
||||
)
|
||||
|
||||
type Post struct {
|
||||
|
@ -40,7 +40,7 @@ func NewPost(authorId string, text string, postName string) {
|
|||
likes: 0,
|
||||
category: "none",
|
||||
postName: postName,
|
||||
id: xid.New().String(),
|
||||
id: guuid.New().String(),
|
||||
}
|
||||
storage.Put(ctx, post.id, std.Serialize(post))
|
||||
updatePostIndex(authorId)
|
||||
|
|
Loading…
Reference in a new issue