Tag
This commit is contained in:
parent
6603399d96
commit
d70f7d37b2
2 changed files with 5 additions and 2 deletions
5
main.go
5
main.go
|
@ -25,11 +25,14 @@ func NewApp() *gin.Engine {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
ioutil.WriteFile("slides.md", body, 0644)
|
||||
c.String(200, string(body))
|
||||
})
|
||||
|
||||
r.PUT("/slides.md", func(c *gin.Context) {
|
||||
c.String(403, "")
|
||||
body, _ := ioutil.ReadAll(c.Request.Body);
|
||||
ioutil.WriteFile("slides.md", body, 0644)
|
||||
c.String(200, "")
|
||||
})
|
||||
|
||||
return r
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<body>
|
||||
<div id="edit-pane">
|
||||
<div id="controls">
|
||||
<a href="" target="_blank" onclick="save();"> Present</a>
|
||||
<a href="{{ .pubTo}}" target="_blank" onclick="save();"> Present</a>
|
||||
</div>
|
||||
<div id="editor"></div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue