mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Cleaned up a little
This commit is contained in:
parent
965989530c
commit
179cf911ca
7
main.go
7
main.go
@ -57,11 +57,10 @@ Options:`)
|
||||
// Default page
|
||||
p := CowyoData{"about", about_page, []string{}, []string{}}
|
||||
p.save(about_page)
|
||||
fmt.Println(about_page)
|
||||
|
||||
var q CowyoData
|
||||
q.load("SpikySeaSlug")
|
||||
rebuildTexts(q)
|
||||
//var q CowyoData
|
||||
//q.load("SpikySeaSlug")
|
||||
//rebuildTexts(q)
|
||||
|
||||
r := gin.Default()
|
||||
r.LoadHTMLGlob("templates/*")
|
||||
|
@ -41,15 +41,11 @@ func wshandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var p CowyoData
|
||||
err = p.load(m.Title)
|
||||
fmt.Println("LOADED")
|
||||
fmt.Println(p)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if m.UpdateServer {
|
||||
err := p.save(m.TextData)
|
||||
fmt.Println("SAVED")
|
||||
fmt.Println(p)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user