delete usls logs from post
This commit is contained in:
parent
125cb1ad63
commit
892f607cd0
1 changed files with 1 additions and 6 deletions
|
@ -42,18 +42,15 @@ func NewPost(login string, text string, postName string) {
|
|||
updatePostIndex(login)
|
||||
lastPostIndex := storage.Get(ctx, login+lastIndex).(int)
|
||||
storage.Put(ctx, login+"_p_"+std.Itoa10(lastPostIndex), post.id)
|
||||
runtime.Log("BLIN BLINSKIY POST " + post.id + "--------" + login + "_p_" + std.Itoa10(lastPostIndex))
|
||||
runtime.Log("AIDISHNIK " + storage.Get(ctx, post.id).(string))
|
||||
runtime.Log("Post created. Post id: " + post.id + "; User post id" + login + "_p_" + std.Itoa10(lastPostIndex))
|
||||
}
|
||||
|
||||
func GetAllPosts() []Post {
|
||||
posts := make([]Post, 0)
|
||||
ctx := storage.GetReadOnlyContext()
|
||||
runtime.Log("SUUUUUDAAAAAAAAAAAAAAAAA SUKA xyu")
|
||||
it := storage.Find(ctx, "post", storage.ValuesOnly|storage.DeserializeValues)
|
||||
for iterator.Next(it) {
|
||||
post := iterator.Value(it).(Post)
|
||||
runtime.Log("SUUUUUDAAAAAAAAAAAAAAAAA SUKA")
|
||||
runtime.Log(string(std.Serialize(post)))
|
||||
posts = append(posts, post)
|
||||
}
|
||||
|
@ -77,10 +74,8 @@ func GetAllPostsByUser(login string) []Post {
|
|||
var postsByUser []Post = make([]Post, 0)
|
||||
i := 1
|
||||
n := getPostIndex(login)
|
||||
runtime.Log("N NUM BLIN BLIN" + std.Itoa10(n))
|
||||
for i < n+1 {
|
||||
post_key := storage.Get(ctx, login+"_p_"+std.Itoa10(i)).(string)
|
||||
runtime.Log("SUKA POSTKEY " + post_key)
|
||||
post := storage.Get(ctx, post_key)
|
||||
i++
|
||||
postsByUser = append(postsByUser, std.Deserialize(post.([]byte)).(Post))
|
||||
|
|
Loading…
Reference in a new issue