try generating new confluence content object
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
20
main.go
20
main.go
@@ -354,22 +354,32 @@ func main() {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
//fmt.Printf("%+v\n", c)
|
||||
fmt.Printf("%+v\n", c)
|
||||
|
||||
// Generate new content for confluence
|
||||
|
||||
fmt.Printf("Current content: %s\n", c.Body.Storage.Value)
|
||||
//fmt.Printf("Current content: %s\n", c.Body.Storage.Value)
|
||||
|
||||
//dummyTable := "<table><tbody><tr><th>VM Name</th><th>Cluster Name</th></tr><tr><td>VM1</td><td>Cluster1</td></tr></tbody></table>"
|
||||
newTable := generateBusSharingTable()
|
||||
newContent := updateHtml(c.Body.Storage.Value, "wsdc-vc-npr.srv.westpac.com.au", newTable)
|
||||
fmt.Printf("New Content: %v\n", newContent)
|
||||
|
||||
c.Body.Storage.Value = newContent
|
||||
data := &goconfluence.Content{
|
||||
ID: *cPageId,
|
||||
Body: goconfluence.Body{
|
||||
Storage: goconfluence.Storage{
|
||||
Value: newContent,
|
||||
Representation: "storage",
|
||||
},
|
||||
},
|
||||
}
|
||||
//c.Body.Storage.Value = newContent
|
||||
fmt.Printf("confluence object : '%v'\n", data)
|
||||
|
||||
result, err := api.UpdateContent(c)
|
||||
result, err := api.UpdateContent(data)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
fmt.Printf("Error updating content: %s\n", err)
|
||||
return
|
||||
}
|
||||
fmt.Printf("result: %v\n", result)
|
||||
|
Reference in New Issue
Block a user