added back the id for the db rows
This commit is contained in:
parent
2bc75ecc2c
commit
81bc211907
|
@ -23,6 +23,7 @@ var mediaPath *string = nil
|
|||
var templatesPath *string = nil
|
||||
|
||||
type Comic struct {
|
||||
ID int
|
||||
DateTime string
|
||||
Title string
|
||||
Image string
|
||||
|
@ -52,6 +53,7 @@ func getComic(id int) (*Comic, error) {
|
|||
|
||||
const dbSquema string = `
|
||||
CREATE TABLE IF NOT EXISTS comic (
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
datetime DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
title CHAR(50),
|
||||
image CHAR(200),
|
||||
|
@ -122,7 +124,7 @@ func comicView(w http.ResponseWriter, r * http.Request) {
|
|||
Title: "Black Ram Comics",
|
||||
}
|
||||
|
||||
i := 1
|
||||
i := 0
|
||||
if len(path) > 0{
|
||||
i, err = strconv.Atoi(path)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue