Skip to content

Commit

Permalink
0.0.6:save Modified
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjia404 committed Jul 6, 2023
1 parent 8ea1844 commit b44b0db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type UserData struct {
Title string `json:"title"`
Description string `json:"description"`
Links string `json:"links"`
Modified int64 `json:"modified"`
Post []Post `json:"post"`
}

Expand Down Expand Up @@ -118,7 +119,7 @@ func setupRouter(db *gorm.DB) *gin.Engine {
result := db.Where(models.Blog{Address: address}).FirstOrCreate(&models.Blog{
Title: result.Title,
Address: address,
Modified: 0,
Modified: result.Modified,
Description: "Zeronet",
})
if result.RowsAffected >= 1 {
Expand Down

0 comments on commit b44b0db

Please sign in to comment.