Skip to content

Commit

Permalink
fix: resolve devx boards2 branch issues (gnolang#3365)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeronimoalbi authored and x1unix committed Jan 6, 2025
1 parent 5f64241 commit 46dc59b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 24 deletions.
6 changes: 0 additions & 6 deletions examples/gno.land/p/demo/boards2/admindao/gno.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
module gno.land/p/demo/boards2/admindao

require (
gno.land/p/demo/avl v0.0.0-latest
gno.land/p/demo/uassert v0.0.0-latest
gno.land/p/demo/urequire v0.0.0-latest
)
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/boards2/board.gno
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ func (board *Board) GetURLFromReplyID(threadID, replyID PostID) string {
}

func (board *Board) GetPostFormURL() string {
return txlink.URL("CreateThread", "bid", board.id.String())
return txlink.Call("CreateThread", "bid", board.id.String())
}
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/boards2/board_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestBoard_GetURLFromReplyID(t *testing.T) {
func TestBoard_GetPostFormURL(t *testing.T) {
bid := BoardID(386)
b := newBoard(bid, "foo1234", "")
expect := txlink.URL("CreateThread", "bid", bid.String())
expect := txlink.Call("CreateThread", "bid", bid.String())
got := b.GetPostFormURL()
uassert.Equal(t, expect, got)
}
12 changes: 0 additions & 12 deletions examples/gno.land/r/demo/boards2/gno.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
module gno.land/r/demo/boards2

require (
gno.land/p/demo/avl v0.0.0-latest
gno.land/p/demo/boards2/admindao v0.0.0-latest
gno.land/p/demo/mux v0.0.0-latest
gno.land/p/demo/testutils v0.0.0-latest
gno.land/p/demo/uassert v0.0.0-latest
gno.land/p/demo/ufmt v0.0.0-latest
gno.land/p/demo/urequire v0.0.0-latest
gno.land/p/moul/txlink v0.0.0-latest
gno.land/r/demo/users v0.0.0-latest
)
8 changes: 4 additions & 4 deletions examples/gno.land/r/demo/boards2/post.gno
Original file line number Diff line number Diff line change
Expand Up @@ -180,28 +180,28 @@ func (post *Post) GetURL() string {
}

func (post *Post) GetReplyFormURL() string {
return txlink.URL("CreateReply",
return txlink.Call("CreateReply",
"bid", post.board.id.String(),
"threadID", post.threadID.String(),
"postID", post.id.String(),
)
}

func (post *Post) GetRepostFormURL() string {
return txlink.URL("CreateRepost",
return txlink.Call("CreateRepost",
"bid", post.board.id.String(),
"postID", post.id.String(),
)
}

func (post *Post) GetDeleteFormURL() string {
if post.IsThread() {
return txlink.URL("DeleteThread",
return txlink.Call("DeleteThread",
"bid", post.board.id.String(),
"threadID", post.threadID.String(),
)
}
return txlink.URL("DeleteReply",
return txlink.Call("DeleteReply",
"bid", post.board.id.String(),
"threadID", post.threadID.String(),
"replyID", post.id.String(),
Expand Down

0 comments on commit 46dc59b

Please sign in to comment.