forked from jason/cpolis
Allow articles to be independent of an issue and allow a title for an issue
This commit is contained in:
@@ -59,14 +59,15 @@ func PublishLatestIssue(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFun
|
||||
mimeType := mime.TypeByExtension(filepath.Ext(imgAbsName))
|
||||
|
||||
article := &b.Article{
|
||||
Title: "Autogenerated cpolis Issue Article",
|
||||
EncURL: fmt.Sprint(c.Domain, "/image/serve/", imgFileName),
|
||||
EncLength: int(imgSize),
|
||||
EncType: mimeType,
|
||||
Published: true,
|
||||
Rejected: false,
|
||||
Created: time.Now(),
|
||||
AuthorID: session.Values["id"].(int64),
|
||||
Title: r.PostFormValue("issue-title"),
|
||||
EncURL: fmt.Sprint(c.Domain, "/image/serve/", imgFileName),
|
||||
EncLength: int(imgSize),
|
||||
EncType: mimeType,
|
||||
Published: true,
|
||||
Rejected: false,
|
||||
Created: time.Now(),
|
||||
AuthorID: session.Values["id"].(int64),
|
||||
AutoGenerated: true,
|
||||
}
|
||||
fmt.Println(article.Link)
|
||||
|
||||
|
Reference in New Issue
Block a user