Skip to content

Commit

Permalink
Support post
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjia404 committed Jun 27, 2023
1 parent c96ea6f commit b194e42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func setupRouter(db *gorm.DB) *gin.Engine {
}
description := strings.Replace(buf.String(), "http://127.0.0.1:43110/", "/", -1)
links := strings.Replace(linksBuf.String(), "http://127.0.0.1:43110/", "/", -1)
links = strings.Replace(links, "?Post:", "?post_id=", -1)

c.HTML(http.StatusOK, "posts/index.tmpl", gin.H{
"address": address,
Expand All @@ -166,6 +167,7 @@ func setupRouter(db *gorm.DB) *gin.Engine {
}

body := strings.Replace(buf.String(), "http://127.0.0.1:43110/", "/", -1)
body = strings.Replace(body, "?Post:", "?post_id=", -1)
c.HTML(http.StatusOK, "posts/post.tmpl", gin.H{
"address": address,
"proxy_host": ProxyHost,
Expand Down

0 comments on commit b194e42

Please sign in to comment.