Compare commits
2 Commits
3aa8796537
...
59deb69e2f
Author | SHA1 | Date | |
---|---|---|---|
59deb69e2f | |||
3aef27585a |
@ -14,7 +14,7 @@ func ServeAtomFeed(c *b.Config) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
absFilepath, err := filepath.Abs(c.AtomFeed)
|
||||
absFilepath, err := filepath.Abs(c.AtomFile)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
|
@ -469,7 +469,7 @@ func PublishArticle(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFunc {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if err = b.SaveAtomFeed(c.AtomFeed, feed); err != nil {
|
||||
if err = b.SaveAtomFeed(c.AtomFile, feed); err != nil {
|
||||
log.Println(err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
@ -704,7 +704,7 @@ func DeleteArticle(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFunc {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if err = b.SaveAtomFeed(c.AtomFeed, feed); err != nil {
|
||||
if err = b.SaveAtomFeed(c.AtomFile, feed); err != nil {
|
||||
log.Println(err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
@ -17,12 +17,6 @@ func UploadImage(c *b.Config, s *b.CookieStore) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
if err := r.ParseMultipartForm(10 << 20); err != nil {
|
||||
log.Println(err)
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
file, _, err := r.FormFile("article-image")
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
@ -97,7 +97,7 @@ func PublishLatestIssue(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFun
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if err = b.SaveAtomFeed(c.AtomFeed, feed); err != nil {
|
||||
if err = b.SaveAtomFeed(c.AtomFile, feed); err != nil {
|
||||
log.Println(err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
@ -18,12 +18,6 @@ func UploadPDF(c *b.Config, s *b.CookieStore) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
if err := r.ParseMultipartForm(10 << 20); err != nil {
|
||||
log.Println(err)
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
file, _, err := r.FormFile("pdf-upload")
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user