From 21d14fef3c8fc7a1eb2efa825a3f8f187495670f Mon Sep 17 00:00:00 2001 From: maksaid Date: Mon, 8 Jan 2024 15:56:25 +0300 Subject: [PATCH] fix: id-s --- Post/post_contract.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Post/post_contract.go b/Post/post_contract.go index 21752c7..5c60bcc 100644 --- a/Post/post_contract.go +++ b/Post/post_contract.go @@ -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)